note 102915 added to function.imagecreatefromgif
| From: | MalcolmMurphy at osu1 dot php dot net | Date: | Mon, 14 Mar 2011 20:59:30 +0000 |
| Subject: | note 102915 added to function.imagecreatefromgif | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-177870@lists.php.net to get a copy of this message | ||
Hopefully this might save someone a headache when using functions to check for animated GIFs.
I have come across some some GIFs use the a different frame separator sequence, \x00\x21, instead of
the official standard \x00\x2C. This seems to be happening with animated GIFs saved in Photoshop
CS5, although I'm not quite sure if that's where the issue is originating from.
Anyway, I've been using the pattern:
"#\x00\x21\xF9\x04.{4}\x00(\x2C|\x21)#s"
which seems to cover all GIFs, hopefully without misinterpreting.
Cheers.
----
Server IP: 81.88.49.32
Probable Submitter: 96.31.105.56
----
Manual Page -- http://www.php.net/manual/en/function.imagecreatefromgif.php
Edit -- https://master.php.net/note/edit/102915
Del: integrated -- https://master.php.net/note/delete/102915/integrated
Del: useless -- https://master.php.net/note/delete/102915/useless
Del: bad code -- https://master.php.net/note/delete/102915/bad+code
Del: spam -- https://master.php.net/note/delete/102915/spam
Del: non-english -- https://master.php.net/note/delete/102915/non-english
Del: in docs -- https://master.php.net/note/delete/102915/in+docs
Del: other reasons-- https://master.php.net/note/delete/102915
Reject -- https://master.php.net/note/reject/102915
Search -- https://master.php.net/manage/user-notes.php