GIMP Chat
http://gimpchat.com/

Quality loss while making GIF
http://gimpchat.com/viewtopic.php?f=8&t=17807
Page 1 of 1

Author:  meetdilip [ Tue Nov 19, 2019 10:55 pm ]
Post subject:  Quality loss while making GIF

GIMP Version: 2.10.14
Operating System: Linux
OS Version: 18.04
GIMP Experience: Basic Level

List any relevant plug-ins or scripts:
None

List any ERROR messages you received:
None



I use the export option for making GIF. Sadly, the quality of GIF images is low. There are burrs in GIF indicating low quality. I export from Inkscape with decent quality and I would like the GIF to be of the same quality. Is there any way out ? Thanks.

In simple words, I want GIF frames to keep the same quality as imported into GIMP.

Author:  lylejk [ Wed Nov 20, 2019 12:30 am ]
Post subject:  Re: Quality loss while making GIF

GIF is an 8-bit format (256 color) so loss of quality is a given. You can try to implement dithering to fake a better quality, but dithering will add grain to the result. Your better bet is to use animated PNG (apng) files but not all browsers support that format (not to mention file size will be much bigger for this format than GIF). :)

Author:  meetdilip [ Wed Nov 20, 2019 1:07 am ]
Post subject:  Re: Quality loss while making GIF

Thanks @lylejk . Is there any other tool available using which I can preserve the quality same as the base image ?

PS : Looks like GIMP do not support exporting to apng. Which tool can do it ?

Author:  Nidhogg [ Wed Nov 20, 2019 1:38 am ]
Post subject:  Re: Quality loss while making GIF

There's a small program called APNGasm or APNG Assembler I have used on Windows

https://sourceforge.net/projects/apngasm/

Author:  meetdilip [ Wed Nov 20, 2019 1:47 am ]
Post subject:  Re: Quality loss while making GIF

Thanks Nidhogg. I use Ubuntu 18.04.

Also, I don't know how. But the guys at JoyPixels are giving away very sharp animated smilies. Not sure how or which tool they are using. We should also be able to do that, right ?

Author:  Nidhogg [ Wed Nov 20, 2019 2:01 am ]
Post subject:  Re: Quality loss while making GIF

Didn't pay attention because I still have sleep sand in my eyes, sorry. I'm also using Ubuntu 18 mostly.
But I got APNG working on Win10 64x, Gimp 2.10.12!

Image

Animated only in supported browsers (only a quick HUE-change for testing purpose):

Image

Author:  meetdilip [ Wed Nov 20, 2019 2:53 am ]
Post subject:  Re: Quality loss while making GIF

Thank you. Never noticed that. :)

What does interlace / interlacing means ?

Also, does anyone know a good way to create a GIF as close as the quality of the base image ?

I am attaching the Joypixel animation. It has a very good quality

Attachment:
dizzy_face_128.gif
dizzy_face_128.gif [ 171.97 KiB | Viewed 8655 times ]

Author:  meetdilip [ Wed Nov 20, 2019 3:03 am ]
Post subject:  Re: Quality loss while making GIF

I don't see the apng option while exporting as PNG. Using 2.10.14

Attachment:
animated png missing.png
animated png missing.png [ 35.63 KiB | Viewed 8652 times ]

Author:  Nidhogg [ Wed Nov 20, 2019 3:05 am ]
Post subject:  Re: Quality loss while making GIF

meetdilip wrote:
I don't see the apng option while exporting as PNG. Using 2.10.14

That's because it's not included in the default Gimp installation, I used apng plug-in that needs to be installed afterwards.
Will post it in the Scripts & Plug-ins section.

You certainly can make as nice gif in Gimp as the one you posted.
The quality and smoothness of your animation is not dependent on the colors only.
The amount of frames used makes a big difference on how the animation looks.
More frames = smaller step in movement = smooth animation. Frame timings also matter, sometimes you want to time each frame individually.

Author:  rich2005 [ Wed Nov 20, 2019 4:21 am ]
Post subject:  Re: Quality loss while making GIF

@meetdilip

First quality. You little gif looks good because it is 1) simple 2) not over ambitious 3) well constructed, not much in the way of pixelation due to translations (rotations etc.) It has 60 frames far more than usual for that type of animation. Eight or ten is more common. Up to you and your skills.

This a comparison of three adjacent frames. The main 'body' static and the spirals rotate a couple of degrees at the most.

Image

You are not going to get the Gimp apng plugin working in linux. It requires a libpng that has been compiled with apng support. You will have to compile that yourself. Last time I got that working in linux was PClinuxOS and Gimp 2.6

What works with 'buntu 18.04 ? A java application from https://www.reto-hoehener.ch/japng/ That is the one I use in my kubuntu 18.04
...but look at the date of the java application. Apng is not well supported. If you give it a try, remember to convert the gif to RGB and you need some plugin to export all the layers to separate png's.

A better bet these days is webp. Still not universal support but it will come.

There was an earlier discussion here: https://gimpchat.com/viewtopic.php?f=22&t=15790#p218619

edit:
Quote:
What does interlace / interlacing means


Just remembered this ;) An interlaced image will display alternate lines (of pixels) to build up an image. ie. 1, 3 , 5 ... before 2, 4, 6,....
This allows a nearly full image to be displayed quickly before the complete picture is 'filled-in' Can be used with various image and video formats. Really for days when computers and internet connections were much slower. You could get a web-page with graphics up and readable faster.

Author:  ofnuts [ Wed Nov 20, 2019 5:03 am ]
Post subject:  Re: Quality loss while making GIF

High quality? Here is how it looks on a black background:

Attachment:
Dizzy-black.gif
Dizzy-black.gif [ 169.88 KiB | Viewed 3368 times ]


Notice the weird effects on the edge....

So it is likely that in addition to the high frame rate they play clever games with the edges (because if you look at each frame individually there are pixels that are there for a purpose), but still the end result is restricted to light backgrounds, so i not that much better than a semi-flattened image.

Also wondering why everyone here mentions APNG. This standard is mostly dead, if you want clean animations, use Webp, its is supported out of the box by Gimp and your browser.

Author:  Nidhogg [ Wed Nov 20, 2019 5:34 am ]
Post subject:  Re: Quality loss while making GIF

Yeah, not looking so nice after all, and we knew that because gif supports only full opacity.
I agree with you Ofnuts, and am switching to Webp now! Ahhhhh... :hoh

Image

Author:  meetdilip [ Wed Nov 20, 2019 6:56 am ]
Post subject:  Re: Quality loss while making GIF

Thanks Nidhogg, rich2005 . Very helpful replies.

So the solution is webp, apng or higher frame rate ?

Author:  Nidhogg [ Wed Nov 20, 2019 11:36 am ]
Post subject:  Re: Quality loss while making GIF

The solution, to all of your animation problems from here to eternity!
Or at least until they come up with next format or tech.

1. Use WebP. WebP supports 24-bit RGB color with an 8-bit alpha channel, compared to GIF's 8-bit color and 1-bit alpha.
WebP animation can also combine lossy and lossless frames. GIF only supports lossless compression.
2. Make sure you have enough frames, so that your animation looks smooth and not jerky. Especially if it's rotation, constant move etc.

These are jaggy .gif because the board does not support webp, and I don't have apng on ubuntu.
But it only demonstrates the meaning of frame count, or frame rate.

18 layers, 20 degree turn, 200ms

Image

36 layers, 10 degree turn, 100ms

Image

72 layers, 5 degree turn, 50ms

Image

Summary. If I made my rotation animation frames in Inkscape:
Preferences: Behaviour, steps. Rotation snaps every 5 degrees.

Author:  meetdilip [ Wed Nov 20, 2019 11:53 pm ]
Post subject:  Re: Quality loss while making GIF

Thanks. Looks like there are not many options.

I missed your post @ofnuts . Nicely explained :thumbsup:

Author:  Pat625 [ Thu Nov 21, 2019 11:57 pm ]
Post subject:  Re: Quality loss while making GIF

Where can one download Webp?

Author:  ofnuts [ Fri Nov 22, 2019 12:28 am ]
Post subject:  Re: Quality loss while making GIF

You don't need to downlaod any additional things, webp is one of the formats that are supported natively by Gimp 2.10.

For samples, see https://developers.google.com/speed/webp/gallery1

Author:  Nidhogg [ Fri Nov 22, 2019 1:46 am ]
Post subject:  Re: Quality loss while making GIF

Pat625 wrote:
Where can one download Webp?


Image

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/