pixelmatix / AnimatedGIFs

MIT License
62 stars 34 forks source link

chasm1.gif does not decode properly #21

Closed marcmerlin closed 6 years ago

marcmerlin commented 6 years ago

As discussed here: I used piskelapp, and basically repeated what I was already saying above :) The first decode frame of chasm1.gif by your app has the blue pixel for the eye at 8,10 (starting from 0,0): 86,123,150 as decoded by piskelapp the adjacent skin pixels at 9,10 and 10,10 are both 255,207,170 as decoded by piskelapp 11,10 is 218,146,115 as decoded by piskelapp The pixels decode by your library, are: 8,10>255,207,170 9,10>255,207,170 10,10>255,207,170 11,10>181,119,95

2 of those (50%) are very wrong, so the library seems broken. I ran your code again on teensy, and same output: 8,10>255,207,170 9,10>255,207,170 10,10>255,207,170 11,10>181,119,95

marcmerlin commented 6 years ago

You can reproduce this by using/pulling https://github.com/pixelmatix/AnimatedGIFs/pull/20

define DEBUGLINE 10

define FIRSTINDEX 1 < set correct index for chasm1.gif on your sdcard

embedded-creations commented 6 years ago

There's no blue pixel on line 10, it's on line 8.

Here's the line with the blue pixel, and it matches line 8 in piskelapp

4,8>127,83,78
5,8>127,83,78
6,8>127,83,78
7,8>221,229,229
8,8>86,123,150
9,8>255,207,170
10,8>255,207,170
11,8>218,146,115
marcmerlin commented 6 years ago

You are correct on the pixel location, the confusion came from gimp showing me the last frame of the GIF, and me looking at the last frame in piskel, but indeed your library (and my picture of the decoded image) are the first frame, sorry about that. Problem was as you said gamma correction which I thought FastLED had by default, but in fact it has color correction which doesn't do the same thing.