GIF - Incorrect Value of Bits Per Pixel(Maybe)

Started by saurabheights, March 10, 2017, 01:25:21 AM

Previous topic - Next topic

saurabheights

This test is done on a gif file on Mac using exiftool 10.12.

exiftool -verbose 5abH_1484991728315_4d9b42ef_a234.jpeg
  ExifToolVersion = 10.12
  FileName = 5abH_1484991728315_4d9b42ef_a234.jpeg
  Directory = .
  FileSize = 335113
  FileModifyDate = 1484991733
  FileAccessDate = 1489051302
  FileInodeChangeDate = 1489047135
  FilePermissions = 33188
  FileType = GIF
  FileTypeExtension = GIF
  MIMEType = image/gif
  GIFVersion = 89a
  ScreenDescriptor (SubDirectory) -->
  + [BinaryData directory, 7 bytes]
  | ImageWidth = 250
  | ImageHeight = 373
  | HasColorMap = 128
  | ColorResolutionDepth = 112
  | BitsPerPixel = 7
  | BackgroundColor = 255
Application Extension: NETSCAPE 2.0
  ExtensionAnimation (SubDirectory) -->
  + [BinaryData directory, 5 bytes]
  | AnimationIterations = 0
Image: left=0 top=0 width=250 height=373
Graphic Control: delay=0.00
Image: left=0 top=0 width=250 height=373
Graphic Control: delay=0.00
Image: left=0 top=0 width=250 height=373
Graphic Control: delay=0.00
Image: left=0 top=0 width=250 height=373
Graphic Control: delay=0.00
Image: left=0 top=0 width=250 height=373
Graphic Control: delay=0.00
Image: left=0 top=0 width=250 height=373
  FrameCount = 6


The value of BitsPerPixel = 7 is probably incorrect. The 5th byte in Screen Descriptor of GIF file is 01110111. The three bold bits value is 7, and thus the value of Bits per pixel should be 8, according to http://www.martinreddy.net/gfx/2d/GIF87a.txt (Search for "# bits of color resolution"). It was the closest official document I could find.

Apologies if this post is a duplicate or the behaviour reported is intended of the application.

saurabheights

For gif file, you can use this link:- https://img0.ropose.com/story/1484290169397_475_25361880-6512-4b80-94a8-6a90ccdb0bc4.jpeg [The use of jpeg in extension is intentional]

Phil Harvey

You are looking at the "raw" values in the verbose output.  This is before adding the +1 correction.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

saurabheights