Avatar Filesize Issues

Discussion of all aspects of the website, wiki, and forums, including support requests and new ideas.

Moderators: Forum Moderators, Developers

Post Reply
User avatar
Shield
Posts: 51
Joined: January 23rd, 2011, 5:58 pm

Avatar Filesize Issues

Post by Shield » January 6th, 2015, 1:32 pm

I want to make my avatar one of the sprites I've frankie'd, but they just seem to be too large! The size limit is 10k, and anything I make is usually around twice that. It turns out most sprites are only 2 or 3k; mine are, for some reason, way larger. My problem is that my spites are the exact same dimensions as per mainline specifications, 72x72, and yet their files are huge! How can I shrink the files down to usable sizes without losing quality or accessibility?

(forgive me if this is the wrong thread, this is my first topic...)

User avatar
zookeeper
WML Wizard
Posts: 9740
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Avatar Filesize Issues

Post by zookeeper » January 6th, 2015, 2:16 pm

You sure you're saving them as png? If so, then whichever app you're using probably does a poor job compressing them, and/or the sprite is somehow so unusually complicated that it compresses poorly. You can attach the image here and someone can take a look at it.

User avatar
Shield
Posts: 51
Joined: January 23rd, 2011, 5:58 pm

Re: Avatar Filesize Issues

Post by Shield » January 6th, 2015, 10:08 pm

Here she is.
Image
20 whole kilobytes! It's like this for almost every sprite I make.
Creator of Lonely Era.
Here's my art!
I'm also on Tumblr.

User avatar
Dugi
Posts: 4925
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Avatar Filesize Issues

Post by Dugi » January 6th, 2015, 11:23 pm

zookeeper was right, your program must have a really bad compression. When I saved it, it took only 1.9 kB. You can use it as your forum avatar.
Untitled.png
Untitled.png (1.82 KiB) Viewed 4188 times
Who program are you using anyway?
I used GIMP to create the far smaller file, so I suggest you to use GIMP too, if nothing else then at least to compress it to take less space.

User avatar
zookeeper
WML Wizard
Posts: 9740
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Avatar Filesize Issues

Post by zookeeper » January 6th, 2015, 11:37 pm

Yeah, it seems whatever you use saves it completely uncompressed, since the filesize is about the same as on an uncompressed tga. I got 1.5KB with Paint.net and after running it through PNGGauntlet it dropped to a mere 0.96KB. :geek:

User avatar
Elvish_Hunter
Developer
Posts: 1384
Joined: September 4th, 2009, 2:39 pm
Location: Lintanir Forest...

Re: Avatar Filesize Issues

Post by Elvish_Hunter » January 7th, 2015, 9:43 am

After Dugi and zookeeper, I decided to try handling this file as well ;)
First of all, exactly like Dugi did, I opened it in GIMP, and exported it with these parameters:
GIMP parameters.png
GIMP parameters.png (36.98 KiB) Viewed 4155 times
At this point, the file had a size of 2039 bytes (we started from 19954!).
Then I passed it through pngcrush, that is a command line utility available on Linux, but there are the .exe files for Windows as well. After running it with the basic parameters (just input file name and output file name), the size went down to 1140 bytes.
So, here it is.
After GIMP and pngcrush
After GIMP and pngcrush
vPJWoHT_GIMP_c.png (1.11 KiB) Viewed 4155 times
Current maintainer of these add-ons:
1.14: The Sojournings of Grog, A Rough Life, The White Troll (co-author), Wesnoth Lua Pack
1.12: Children of Dragons

User avatar
Shield
Posts: 51
Joined: January 23rd, 2011, 5:58 pm

Re: Avatar Filesize Issues

Post by Shield » January 7th, 2015, 1:08 pm

Wow, you guys really know how to compress these images! One thing, though: is there something I can do that works for a Mac computer? I use Photoshop CC to make my sprites and, after some research, found that I'm not the only one experiencing these size issues. I have a version of Gimp on another computer and, after reading your replies, I tried saving one of my sprites with it and its filesize shrunk right down! Seems convenient, but I have quite a few sprites, and I'd have to either email them to myself or use a flash drive to get them on the computer with Gimp, and the downloading, opening and resaving of each one adds up to be pretty time-consuming; I could be making my sprites in Gimp, but I know almost nothing about how it works, since I've always used Photoshop. Any ideas?
Creator of Lonely Era.
Here's my art!
I'm also on Tumblr.

User avatar
Dugi
Posts: 4925
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Avatar Filesize Issues

Post by Dugi » January 7th, 2015, 1:11 pm

Why don't you just install GIMP on that Mac?

aquileia
Developer
Posts: 120
Joined: August 25th, 2012, 5:13 pm

Re: Avatar Filesize Issues

Post by aquileia » January 7th, 2015, 3:12 pm

https://imageoptim.com/
is recommended for Mac by the author of PNGGauntlet.

User avatar
Elvish_Hunter
Developer
Posts: 1384
Joined: September 4th, 2009, 2:39 pm
Location: Lintanir Forest...

Re: Avatar Filesize Issues

Post by Elvish_Hunter » January 8th, 2015, 9:48 am

Dugi wrote:Why don't you just install GIMP on that Mac?
It could be - but we'll know for sure when Shield answers - that his Mac has an old version of Mac OS.
GIMP is indeed available for Mac OS, but the first binary available at http://www.gimp.org/downloads/ (hidden under Show other downloads) works only for releases equal or greater than 10.6. Older systems should use the binary available at http://gimp.lisanet.de .
aquileia wrote:https://imageoptim.com/
is recommended for Mac by the author of PNGGauntlet.
There is, however, an issue with the GIMP: both PNGGauntlet and ImageOptim (and Trimage for Linux, for that matter) rely on optipng - again, another command-line tool. One of the things that optipng does is indexing the image (and that pulls the sprite size down to 866 bytes), but the GIMP has a bug: while it seems to be internally able to handle indexed images with variable transparency levels, it doesn't display them correctly; this means that partial transparency is shown as a solid color area, as can be seen in the screenshot.
GIMP and optipng.png
GIMP and optipng.png (24.89 KiB) Viewed 4095 times
At least, that happens on GIMP 2.8.10. I don't know if it has been corrected in later versions.
Current maintainer of these add-ons:
1.14: The Sojournings of Grog, A Rough Life, The White Troll (co-author), Wesnoth Lua Pack
1.12: Children of Dragons

User avatar
ancestral
Developer
Posts: 1108
Joined: August 1st, 2006, 5:29 am
Location: Motion City

Re: Avatar Filesize Issues

Post by ancestral » January 9th, 2015, 11:44 pm

aquileia wrote:https://imageoptim.com/
is recommended for Mac by the author of PNGGauntlet.
Seconded! This is a fantastic tool with a nice GUI.
Wesnoth BestiaryPREVIEW IT HERE )
Unit tree and stat browser
CanvasPREVIEW IT HERE )
Exp. map viewer

User avatar
Shield
Posts: 51
Joined: January 23rd, 2011, 5:58 pm

Re: Avatar Filesize Issues

Post by Shield » January 12th, 2015, 1:04 pm

Hey, guys!

To answer Dugi, I have thought about downloading GIMP on my Mac, but it's just too different from Photoshop; I've had years to gain proficiency in the latter, and I just don't have as much time as I used to to pick up a completely different set of controls, even if they do pretty much the same thing.

Oh, and I have found a website called http://compresspng.com, where it looks like I can just pass the pictures through without downloading it, and they come out in a downloadable .zip-- I tried it on my 20kb sprite and she came out only 736 bytes! Although I'd rather her at 2 or 3kb like a mainline sprite, this does the job; especially since I'm a little bit anxious about downloading unfamiliar programs.

Does this sound like a solution, good people?
Creator of Lonely Era.
Here's my art!
I'm also on Tumblr.

User avatar
beetlenaut
Developer
Posts: 2379
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: Avatar Filesize Issues

Post by beetlenaut » January 12th, 2015, 7:49 pm

Shield wrote:Although I'd rather her at 2 or 3kb like a mainline sprite, this does the job...Does this sound like a solution, good people?
This sounds great to me. Why would you rather have a larger image? I assume the site uses lossless compression since the output is still a .png, and as long as the pixels are the same, smaller is better.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide

User avatar
Shield
Posts: 51
Joined: January 23rd, 2011, 5:58 pm

Re: Avatar Filesize Issues

Post by Shield » January 12th, 2015, 9:58 pm

beetlenaut wrote:
Shield wrote:Although I'd rather her at 2 or 3kb like a mainline sprite, this does the job...Does this sound like a solution, good people?
This sounds great to me. Why would you rather have a larger image? I assume the site uses lossless compression since the output is still a .png, and as long as the pixels are the same, smaller is better.
Ah, just a personal preference for trying to make my work more similar to that of mainline; but if smaller really is that much better, I can't complain.

This really worked out. Thank you all for your time!
Creator of Lonely Era.
Here's my art!
I'm also on Tumblr.

Post Reply