Post without Account — your post will be reviewed, and if appropriate, posted under Anonymous. You can also use this link to report any problems registering.

RT 44877 - GIF not supporting all extension blocks

  • 1 Replies
  • 1343 Views
*

Offline Phil

  • Global Moderator
  • Sr. Member
  • *****
  • 365
    • View Profile
RT 44877 - GIF not supporting all extension blocks
« October 20, 2016, 07:08:40 PM »
Wed Apr 08 12:55:17 2009 chris.czub [...] gmail.com - Ticket created
Subject:    GIF not supporting all extension blocks
 
I was trying to parse a GIF image in my HTML file using PDF::API2::Resource::XObject::Image::GIF and it reported:

unsupported graphic control extension (254) at /opt/ActivePerl-5.8/site/lib/PDF/API2/Resource/XObject/Image/GIF.pm line
229.

254 is of course 0xFE, which denotes a Comment Extension Block in the GIF format(http://www.onicos.com/staff/iz/formats/gif.html)

The Comment Extension Blocks have the same introducer, 0x21, so PDF::API2::Resource::XObject::Image::GIF thought it was a malformed Graphic Control Extension and died.

This will likely be present on all platforms.
#
Wed Apr 08 13:00:57 2009 chris.czub [...] gmail.com - Correspondence added
 
More specifically, this is a GIF created with The GIMP... here are the hex contents of the comment extension block that is throwing it off:

Code: [Select]
21 FE 15 43 72 65 61 74 65 64 20 77 69 74 68 20 54 68 65 20 47 49 4D 50 00
#
Wed Apr 08 13:00:59 2009 chris.czub [...] gmail.com - Status changed from 'new' to 'open'
#
Mon Apr 27 14:13:28 2009 otto.hirr [...] olabinc.com - Correspondence added
 
carried to PDF::API3 as https://rt.cpan.org/Ticket/Display.html?id=45473
#
Mon Jan 24 20:02:40 2011 steve [...] deefs.net - Correspondence added
 
Hi Chris,

I've just started maintaining PDF::API2, and am not familiar enough with the various graphics formats to be able to address this ticket.  I wonder if it would make sense to use the Imager module or something similar to parse GIF (and other) images instead of having to include and maintain parsing code for each file format.

Is this something you might be willing to look into?

Thanks,
Steve Simms

<formatting cleanup - Mod.>
« Last Edit: May 01, 2017, 10:57:58 AM by Phil »

*

Offline Phil

  • Global Moderator
  • Sr. Member
  • *****
  • 365
    • View Profile
Re: RT 44877 - GIF not supporting all extension blocks
« Reply #1: December 25, 2017, 06:11:04 PM »
 PhilterPaper commented on Nov 25

Someone with GIF graphics format experience to help out here?