-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PNGs loaded with Image.FromFile save GIFs as corrupted files #2
Comments
Just posting to let you know I have seen this but won't have time to look into the issue quite yet. |
I am seeing this as well. It was creating animated GIFs just fine and then all of a sudden they're all corrupted. My code is very simple:
I need this working ASAP, so I'm going to go ahead and see if I can find the problem before I resort to another library. Nice library, by the way. Despite the issue, it's really nicely written. |
I ended up hacking my own together using WPF for the image assembly and bits of NGif to write the custom timings. Ugly. Works. Sent from my iPhone
|
To help diagnose, I tried to load the image here: http://www.smiliegenerator.us/index.php?pid=41 (never been to this site before, but it gave some diagnostics, so that was cool). This is what it said: gifsicle: Error while reading '/home/smilie/public_html/applications/animation/disassemble/temp/0193576001400157938.tmpout.gif' frame #0:
So I traced through the code and byte 808 is the very first byte written in
Anyway, I don't know if that helps to identify the issue. I find It interesting that it was able to determine the dimensions of Image#0 correctly, as those are written in bytes 813-816... |
Looking through the format specs from various places, it appears that the image separator should be 0x2C, but header[0], in my case is 97 decimal. I replaced WriteByte(header[0]) with WriteByte(0x2C) and the site I referenced above read in and displayed all the frames from the GIF without complaint, but all the images were corrupted. :( Not sure what my next step is. |
@danielcrenna Sadly, I've had to switch to NGif. It creates a usable animated GIF. If BumpKit gets fixed, I'd much rather use it because NGif is a pox on my SVN repo. It's so hideously ugly. It's also horribly slow. It takes about 2 minutes to generate my animated GIF vs. BumpKit which did it in about 5 seconds. :( |
The thing is the WPF encoder works just fine if you don't care about timing information. So it got me thinking to prepare the frames using WPF, save the file, then open it again and just make edits to the well known control blocks for timings. This way I'm not using NGif I'm just cribbing the bits that set the metadata that WPF doesn't provide. Best of both worlds. Maybe I'll throw it on github.— On Thu, May 15, 2014 at 10:16 AM, pdavis68 [email protected]
|
Understood. Really sorry I haven't had time to pick this project back up. I'll post here when I get some time to make updates the the GIF engine. |
Hah, don't apologize. My GitHub is a massive wasteland of projects gone by.
|
Hey guys, I am not actively maintaining this project. If you find a solution to these issues please feel free to submit a pull request for the change. I will leave these issues open for others to address. |
^^^ as described. I have two simple PNGs with a transparency channel and the resulting GIF with 100ms delay per frame is unreadable by any program.
The text was updated successfully, but these errors were encountered: