Page 1 of 1

Gif went bad

Posted: Fri Sep 09, 2016 5:52 pm
by jm6o8u
when I put this gif up it went bad the little avi went alright is there some thang new ??
B&W1.gif
B&W1.gif (916.66 KiB) Viewed 3365 times
B&W1avir.gif
B&W1avir.gif (27.23 KiB) Viewed 3365 times

Re: Gif went bad

Posted: Fri Sep 09, 2016 7:13 pm
by AlexKnight
It looks like the resize process messed up the GIF, because when you click on it to see the original size, it's fine.
Best is to keep GIF's to a maximum of 600 pixels in either direction, so the forum software doesn't have to resize it.

I've resized it to a maximum of 600 pixels, and now it looks good, as you can see:
B&W1a.gif
B&W1a.gif (675.6 KiB) Viewed 3350 times
Although, when uploading this image to the Doll Album, the same thing happens during the resize, while other GIF's are fine.
Something must be amiss with this image, but I don't know what.

Re: Gif went bad

Posted: Fri Sep 09, 2016 7:52 pm
by jm6o8u
AlexKnight Thank You
I have noted that and will keep it 600 pixels

Re: Gif went bad

Posted: Fri Sep 09, 2016 8:04 pm
by KarmaMusic
Way to cute and awesome, well done :-)

Re: Gif went bad

Posted: Fri Sep 09, 2016 8:58 pm
by AlexKnight
I've done some more testing, and found the cause of this problem. This happens when follow-up frames have identical pixels.
In the resized image, the follow-up frames will then only show the part that is different.

For testing, I've turned the transparency off and reduced the speed, so you can see what actually happens:

The pixels that are the same are removed in the follow-up frames, and it just stacks the parts that changed on top of the first frame, bottom right.
In the original image, transparency was on, so you would only see the pixels that changed, but the effect was the same.
1h.gif
1h.gif (1.37 MiB) Viewed 3325 times
That is basically how GIF's work if transparency is on, follow-up frames only have the pixels that changed, not the entire frame, that is what keeps the file size down, but the forum software interprets it the wrong way.
If transparency is off, it creates a rectangle around the pixels that changed, as shown in the example above.
Because more pixels have to be stored, for this image, the size grows from 917KB to 1403KB.

After figuring this out, I knew what the problem was. So I made a small edit to every frame, changing the color of a few of the top left pixels, and voila, it looks as intended now, resized and all.
The same thing is still happening as before, but because it checks for changes from the top left down, and the top left pixels are different, you can't see it jumping around like it did.
1j.gif
1j.gif (931.86 KiB) Viewed 3325 times
Transparency is on for this image, so file size only grew to 932KB (those 15KB are the pixels I added), if transparency was off, the file would be 2678KB, as each frame would be a full picture.

This is likely a bug of the resizing software the forum and Doll Album uses, and I'm not sure it can be solved. But changing the top left pixels is a way around it.

Re: Gif went bad

Posted: Fri Sep 09, 2016 10:32 pm
by jm6o8u
thank you
so next time i need to change a few pix in left corner.
got it again thank you