It is currently Tue Jul 02, 2024 3:44 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 18 posts ] 
Author Message
 Post subject: Quality loss while making GIF
PostPosted: Tue Nov 19, 2019 10:55 pm  (#1) 
Offline
GimpChat Member

Joined: Nov 19, 2019
Posts: 207
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.


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Quality loss while making GIF
PostPosted: Wed Nov 20, 2019 12:30 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12531
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). :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Quality loss while making GIF
PostPosted: Wed Nov 20, 2019 1:07 am  (#3) 
Offline
GimpChat Member

Joined: Nov 19, 2019
Posts: 207
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 ?


Top
 Post subject: Re: Quality loss while making GIF
PostPosted: Wed Nov 20, 2019 1:38 am  (#4) 
Offline
GimpChat Member
User avatar

Joined: May 10, 2013
Posts: 1389
Location: FInland
There's a small program called APNGasm or APNG Assembler I have used on Windows

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


Top
 Post subject: Re: Quality loss while making GIF
PostPosted: Wed Nov 20, 2019 1:47 am  (#5) 
Offline
GimpChat Member

Joined: Nov 19, 2019
Posts: 207
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 ?


Top
 Post subject: Re: Quality loss while making GIF
PostPosted: Wed Nov 20, 2019 2:01 am  (#6) 
Offline
GimpChat Member
User avatar

Joined: May 10, 2013
Posts: 1389
Location: FInland
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


Top
 Post subject: Re: Quality loss while making GIF
PostPosted: Wed Nov 20, 2019 2:53 am  (#7) 
Offline
GimpChat Member

Joined: Nov 19, 2019
Posts: 207
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 8640 times ]


Top
 Post subject: Re: Quality loss while making GIF
PostPosted: Wed Nov 20, 2019 3:03 am  (#8) 
Offline
GimpChat Member

Joined: Nov 19, 2019
Posts: 207
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 8637 times ]


Top
 Post subject: Re: Quality loss while making GIF
PostPosted: Wed Nov 20, 2019 3:05 am  (#9) 
Offline
GimpChat Member
User avatar

Joined: May 10, 2013
Posts: 1389
Location: FInland
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.


Top
 Post subject: Re: Quality loss while making GIF
PostPosted: Wed Nov 20, 2019 4:21 am  (#10) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2436
@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.

_________________
Image


Top
 Post subject: Re: Quality loss while making GIF
PostPosted: Wed Nov 20, 2019 5:03 am  (#11) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4752
High quality? Here is how it looks on a black background:

Attachment:
Dizzy-black.gif
Dizzy-black.gif [ 169.88 KiB | Viewed 3351 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.

_________________
Image


Top
 Post subject: Re: Quality loss while making GIF
PostPosted: Wed Nov 20, 2019 5:34 am  (#12) 
Offline
GimpChat Member
User avatar

Joined: May 10, 2013
Posts: 1389
Location: FInland
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


Top
 Post subject: Re: Quality loss while making GIF
PostPosted: Wed Nov 20, 2019 6:56 am  (#13) 
Offline
GimpChat Member

Joined: Nov 19, 2019
Posts: 207
Thanks Nidhogg, rich2005 . Very helpful replies.

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


Top
 Post subject: Re: Quality loss while making GIF
PostPosted: Wed Nov 20, 2019 11:36 am  (#14) 
Offline
GimpChat Member
User avatar

Joined: May 10, 2013
Posts: 1389
Location: FInland
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.


Top
 Post subject: Re: Quality loss while making GIF
PostPosted: Wed Nov 20, 2019 11:53 pm  (#15) 
Offline
GimpChat Member

Joined: Nov 19, 2019
Posts: 207
Thanks. Looks like there are not many options.

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


Top
 Post subject: Re: Quality loss while making GIF
PostPosted: Thu Nov 21, 2019 11:57 pm  (#16) 
Offline
GimpChat Member

Joined: May 12, 2015
Posts: 4694
Where can one download Webp?


Top
 Post subject: Re: Quality loss while making GIF
PostPosted: Fri Nov 22, 2019 12:28 am  (#17) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4752
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

_________________
Image


Top
 Post subject: Re: Quality loss while making GIF
PostPosted: Fri Nov 22, 2019 1:46 am  (#18) 
Offline
GimpChat Member
User avatar

Joined: May 10, 2013
Posts: 1389
Location: FInland
Pat625 wrote:
Where can one download Webp?


Image


Top
Post new topic Reply to topic  [ 18 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Resolution loss editing GIFs

2

No new posts Reducing layer size without loosing quality?

2

No new posts Attachment(s) Image quality and file size hacks

9

No new posts Attachment(s) Making Art from Script

4

No new posts I am making GEGL filters and need help

1



* Login  



Powered by phpBB3 © phpBB Group