H
H
hckn2018-09-19 22:44:19
ImageMagick
hckn, 2018-09-19 22:44:19

How to find out the exact encoding/image format parameters, and how to convert as well?

There is an image
keerthi.b283324e.jpg
How to find out the most accurate parameters? And how to convert also, preferably with some NodeJS module (I use imageminits plugins for conversion, as well as sharp)
The fact is that I encode in progressive, but my images are rendered in a completely different way in the browser. But this picture is rendered very well, right pixel by pixel.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AngReload, 2018-09-20
@hckn

Probably you are talking about this:
Now I think that it depends only on the browser - from time to time any progressive jpeg is decoded this way, depending on how much of the data has managed to load for the first decoding.
Well, in general, only YCbCr 4:4:0 is unusual in this file, I don’t know programs that would have such a subsampling option. Maybe there is something else interesting, but I don't know jpeg very well.
JPEG, progressive, quality: 92, subsampling ON (1x2)
exiftool

ExifTool Version Number         : 11.10
File Name                       : keerthi.b283324e.jpg
Directory                       : .
File Size                       : 34 kB
File Modification Date/Time     : 2018:09:20 07:23:31+05:00
File Access Date/Time           : 2018:09:20 07:36:39+05:00
File Creation Date/Time         : 2018:09:20 07:36:39+05:00
File Permissions                : rw-rw-rw-
File Type                       : JPEG
File Type Extension             : jpg
MIME Type                       : image/jpeg
JFIF Version                    : 1.01
Resolution Unit                 : None
X Resolution                    : 300
Y Resolution                    : 300
Image Width                     : 337
Image Height                    : 337
Encoding Process                : Progressive DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:4:0 (1 2)
Image Size                      : 337x337
Megapixels                      : 0.114

exiftool.exe -verbose keerthi.b283324e.jpg
  ExifToolVersion = 11.10
  FileName = keerthi.b283324e.jpg
  Directory = .
  FileSize = 34312
  FileModifyDate = 1537410211.50311
  FileAccessDate = 1537410999.40376
  FileCreateDate = 1537410999.40376
  FilePermissions = 33206
  FileType = JPEG
  FileTypeExtension = JPG
  MIMEType = image/jpeg
JPEG APP0 (14 bytes):
  + [BinaryData directory, 9 bytes]
  | JFIFVersion = 1 1
  | ResolutionUnit = 0
  | XResolution = 300
  | YResolution = 300
  | ThumbnailWidth = 0
  | ThumbnailHeight = 0
JPEG DQT (130 bytes):
JPEG SOF2 (15 bytes):
  ImageWidth = 337
  ImageHeight = 337
  EncodingProcess = 2
  BitsPerSample = 8
  ColorComponents = 3
JPEG DHT (27 bytes):
JPEG SOS

{ extended: false,
  progressive: true,
  precision: 8,
  scanLines: 337,
  samplesPerLine: 337,
  components:
   { '1':
      { h: 1,
        v: 2,
        quantizationIdx: 0,
        blocksPerLine: 43,
        blocksPerColumn: 43,
        blocks: [Array] },
     '2':
      { h: 1,
        v: 1,
        quantizationIdx: 1,
        blocksPerLine: 43,
        blocksPerColumn: 22,
        blocks: [Array] },
     '3':
      { h: 1,
        v: 1,
        quantizationIdx: 1,
        blocksPerLine: 43,
        blocksPerColumn: 22,
        blocks: [Array] } },
  componentsOrder: [ 1, 2, 3 ],
  maxH: 1,
  maxV: 2,
  mcusPerLine: 43,
  mcusPerColumn: 22 }
quantizationTable Int32Array [ 3, 2, 2, 3, 4, 6, 8, 10, 2, 2, 2, 3, 4, 9, 10, 9, 2, 2, 3, 4, 6, 9, 11, 9, 2, 3, 4, 5, 8, 14, 13, 10, 3, 4, 6, 9, 11, 17, 16, 12, 4, 6, 9, 10, 13, 17, 18, 15, 8, 10, 12, 14, 16, 19, 19, 16, 12, 15, 15, 16, 18, 16, 16, 16 ]
{ width: 337,
  height: 337,
  jfif:
   { version: { major: 1, minor: 1 },
     densityUnits: 0,
     xDensity: 300,
     yDensity: 300,
     thumbWidth: 0,
     thumbHeight: 0,
     thumbData: Uint8Array [  ] },
  adobe: null,
  components:
   [ { lines: [Array], scaleX: 1, scaleY: 1 },
     { lines: [Array], scaleX: 1, scaleY: 0.5 },
     { lines: [Array], scaleX: 1, scaleY: 0.5 } ] }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question