On Thu, 30 Mar 2017 09:25:50 -0700, Hui G wrote:
I am calculating a jpg file size by parsing it as a binary file with
nodejs. The computed width height gives 4032x3024 But when viewing the
image in my mac viewer, the inspector indicates a size of 3024x 4032!
The difference is likely due to an extension chunk indicating that the
image is rotated.
If you take a photo on a smartphone, the raw image dimensions will
typically match that of the CCD, but the software will indicate whether
the image is "portrait" (height > width) or "landscape" (width > height)
based upon the physical orientation of the device at the time that the
photo was taken (determined from the accelerometers).
The Mac's photo viewer is presumably reporting the post-rotation
dimensions rather than the dimensions of the image that's actually stored
in the file.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)