ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: saurabheights on March 10, 2017, 01:25:21 AM

Title: GIF - Incorrect Value of Bits Per Pixel(Maybe)
Post by: saurabheights on March 10, 2017, 01:25:21 AM
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.
Title: Re: GIF - Incorrect Value of Bits Per Pixel(Maybe)
Post by: saurabheights on March 10, 2017, 01:28:22 AM
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]
Title: Re: GIF - Incorrect Value of Bits Per Pixel(Maybe)
Post by: Phil Harvey on March 10, 2017, 08:58:21 AM
You are looking at the "raw" values in the verbose output.  This is before adding the +1 correction.

- Phil
Title: Re: GIF - Incorrect Value of Bits Per Pixel(Maybe)
Post by: saurabheights on March 10, 2017, 10:45:48 AM
Hi Phil,
Thank you for clearing this. :)