Intervention / gif

Native PHP GIF Encoder/Decoder
MIT License
39 stars 8 forks source link

DecoderException #3

Closed sapiet closed 3 years ago

sapiet commented 4 years ago

Hi,

I'm testing 1.0.0-beta with two gifs, and a DecoderException is thrown when I call Decoder::decode($path) function (Unable to parse file header) The regexp in HeaderDecoder->decodeVersion is called with "GIF89a" as subject in my cases, which does not match with the pattern (I think this is related with the ?P part of the pattern ?) Is this a bug or have I a file that is not compatible ?

olivervogel commented 4 years ago

The pattern is ^GIF(?P<version>[0-9]{2}[a-z])$, which should match GIF89a.