Jump to content

PNG and GIF filesizes


Piemaster

Recommended Posts

When I save gifs on my paint.net it tends so save very large files, much larger than when I save them as pngs

however when I go and re-save the file on photoshop as a gif, the file ended up much smaller than both

As an example, I had a sprite at about 28x16 px, when I saved as gif in paint.net it ended up as 969 bytes, then as a png it went down to 400 bytes, but then I went and saved in photoshop as a gif it managed to get down to 206 bytes

I would like to know how I should go about trying to get the gifs saved in paint.net down to about the same size as the photoshop ones ideally, as I am working with a friend who does not have photoshop and I would like them to be able to save smaller gif files on their end

Link to comment
Share on other sites

One thing to note. If your filesize is larger in paint.net, that's not necessarily a bad thing. It would be an indication that the paint.net pic contains more detail to it than it would with the other program. Hence a larger file size.

EDIT:

Also one would have to ask the question what settings are you using when you save as gif? Adjusting the sliders will effect the file size. Do the other programs have the same sort of adjustments when saving, or do they default to something else?

Edited by jim100361
Link to comment
Share on other sites

That may be true, but we have been very careful with colour count and such, especially with sprites it tends to be better that the information is lost because with 1000+ sprites in our game, we don't tend to care as much that the program may have a sprite where two different colours have been grouped together because they are very close since on a larger scale it compromises the filesize of all our sprites. I also would not care about hidden image tags and such.

Looking at the sprites, there is no actual visible difference between them, so that is what matters most along with filesize

edit: when I save as gif on paint.net it gives me dithering and transparency threshold sliders. On photoshop it allows me to choose the palette of colours to be used, the matte, forced colours and I check whether or not there is transparency

oh and, since I am working with sprites, I do not bother with dithering and such, so the settings for those on paint.net and photoshop are ignored. On photoshop the palette is always exact

Edited by Piemaster
Link to comment
Share on other sites

An adjustment to the "dithering" slider will take the file size down considerably. Check it out and see how it effects your piece. (Sorry, but I don't personally use .gifs too often and when I do, those sort of things aren't normally a consideration for me).

Link to comment
Share on other sites

Having used other programmes over the years, .gif is one of those things that can be done in several different manners. I dont recall in Photoshop exactly on this, but I recall it's focus on the .gif was to compress the daylights out of it as they considered it a "web only" format and space/speed being the focus there. Adobe's approach to some was considered a blessing and curse in that respect.

To further state without the finite details I hope someone else has, the method of .gif compression between Photoshop and PDN is different, but I dont know how to explain how/why or which algorithm(s) are being used to be more specific on it or how to match it up. Like many other file types it is considered "best effort" on many levels ... I saw a discussion before when looking for something unrelated that specified this difference but I dont recall if it was here or elsewhere ... And I'm not finding it with search in the top 100 results ...

And while it's not immediately covered by wiki, you can see that options for what is saved, etc in the .gif format can vary and thus effect size of the final image ... Looks like you could do a hex editor comparison of the two files and see what's included/excluded ... Or maybe somebody else has an answer to this that is simpler.

  • Upvote 2

***

Gallery at PDN-Fans

Link to comment
Share on other sites

An additional comment:

In a previous discussion about saving files, etc. it was noted that PDN is set with settings defaulted to give the best output (if I'm interpetting it correctly). This means, defaults to give the best without sacrificing too much one way or the other (I'm paraphrasing). Thankfully the sliders are available in both the .gif and .png format (and others as well) so you may adjust them to better suit your needs.

Edited by jim100361
Link to comment
Share on other sites

Argh Delpart answered it anyway, that's a shame that they save differently =C

I think I'll have a look around, but if anyone has something to say on this it would be a big help =L

Link to comment
Share on other sites

I sit corrected: I opened a very large file (just grabbed anything without noting how large it was) and ajusted the slider down. Of course that's why the file size dropped so much in my case. I know this doesn't help you, but it explains what I conveyed previously. Sorry.

Link to comment
Share on other sites

http://forums.getpaint.net/index.php?showtopic=15317

I knew there was a plugin for this somewhere...sorry for the late response!

Edited by pdnnoob
  • Upvote 1

No, Paint.NET is not spyware...but, installing it is an IQ test. ~BoltBait

Blend modes are like the filling in your sandwich. It's the filling that can change your experience of the sandwich. ~Ego Eram Reputo

Link to comment
Share on other sites

Hey, I'm back. I went and did an example image to show you guys what I mean

j59rgj.png

As you can see, with low colour counts there tends to be no loss when using gifs. The thing I find absolutely wierd though is that PDN saves larger gifs, which are lossy, than pngs, which are lossless

I went and tried pdnnoob's method with the plugin, which actually took it down to 305 bytes which is about the same as the gifs saved by photoshop... But it has no support for transparency which is a shame (kinda need it)

Though I do think pdnnoob is along the right lines... I think PDN doesn't have support for smaller colour palettes and that's what I think is the problem, and the plugin they sent me appears to fix that but has no transparency support, so if anyone knows of a similar plugin with transparency allowance it would be great

Link to comment
Share on other sites

If your goal is to save space on disk then you should know that file systems are clustered in sectors. And a sectors allocates 1024 bytes typically (nowadays they are larger). To fight for bytes if something is smaller than 1024 bytes does no help to save space.

midoras signature.gif

Link to comment
Share on other sites

If you have less than 256 colors in the GIF, then it will be lossless when saved in Paint.NET.

GIF isn't a lossy format per se. However, any image with more than 256 colors cannot be stored losslessly as a GIF, which only supports up to 256 color paletted images. JPEG uses lossy compression but that's totally different and based on shedding quality at a subjective level while maintaining the same color resolution.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

If you have less than 256 colors in the GIF, then it will be lossless when saved in Paint.NET.

GIF isn't a lossy format per se. However, any image with more than 256 colors cannot be stored losslessly as a GIF, which only supports up to 256 color paletted images. JPEG uses lossy compression but that's totally different and based on shedding quality at a subjective level while maintaining the same color resolution.

True =S I meant that when I save sprites, which have low colour count, the gif format should be able to compromise colour information in favour of filesize. Since I am saving limited colour sprites I do experience no loss, but I also get a larger filesize than when photoshop saves the exact same sprite.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...