Topic: What's yet to come in Image Analyzer?

Are there any other features you plan to add to this program? Or are you done with working on the software?

Re: What's yet to come in Image Analyzer?

There will probably be a new version when I find some interesting feature to add... Right now I am quite busy with other projects.

Michael Vinther

> software developer <

Re: What's yet to come in Image Analyzer?

I just realized something important that should be added to image analyzer. Currently, when converting from a 24bit RGB color picture to an 8bit 256 color picture, it generates a 256 color palette, even if the total number of unique colors is less than 256. This poses a problem when trying to save the now-256-color picture which actually contains less than 256 colors as a bitmap file while attempting to reduce file size by keeping the smallest possible palette size in the file. The remaining palette entries are just filled with zeros (I know, I checked with a hex editor). While in some cases a full 256 color pallet padded with zeros may be desirable, in most cases (at least from my point of view), a palette containing ONLY the colors used in the picture is the best type of palette, and it can significantly reduce the file size, especially if the picture is physically small like less than 50x50 pixels, as then the palette takes a reasonable fraction of the file size.

I already tried the "optimize palette" option. But it doesn't truly remove unused palette entries, it just sets them all to zero.


With this said, I believe an option should exist when converting a 24-bitPP picture to an 8-bitPP picture, if less than 256 unique colors are present. In that case it could pop up an option box when you click the convert menu item to perform the conversion. conversion, asking whether to use the smallest possible palette, or use a 256 entry palette while padding the remainder with zeros.

Of course if >256 it should also pop up an option box, but it should ask then which method should be used for color reduction and dithering (just like Photoshop has). I see you already have one letting me pic which algorithm to use, but Photoshop lets set more specifics of the algorithm such as what percent dithering to use, with 0% being "nearest color" which can sometimes be obvious that the picture is missing colors, all the way up to 100% which makes it look more grainy but it visually "simulates" far more than 256 colors.

Only if there are EXACTLY 256 colors should it proceed without asking for user input.

And there is one other conditino it shouldn't ask. If there is (and I'm not sure if there is) a way to batch convert all open pictures, then it should only ask once at the beginning what it should do for <256 colors and once for >256 colors and then use those settings for the all of that batch conversion session.

Last edited by Ben321 (2009-07-29 23:20:14)

Re: What's yet to come in Image Analyzer?

If you save as PNG also the palette will be compressed

Michael Vinther

> software developer <

Re: What's yet to come in Image Analyzer?

I'm looking specifically for REMOVING unsused palette entries so when saving a file as a BMP file it saves no more palette entries than needed. For example, in Image Analyzer a palette using 100 colors is actually 256 palette entries long, it just has 100 colors used, but the remaining 156 colors are set to black, and ARE saved into a bitmap file when saving as BMP. This is a waste of space in a BMP file. If I'm only using 100 colors in my picture file, the palette should only be 100 palette entries long, so when saved the bitmap file color palette will ONLY contain 100 entries. That is what I mean. Now Photoshop does this, but sadly Image Analyzer does not.

But just because Image Analyzer currently isn't set up to do this, doesn't mean that Image Analyzer can't do it. All you have to do is add this functionality to it. You are the programmer after all.

Let me explain exactly what I'm looking for, and why I need it.

I have a picture I'm looking to insert into a game (I'm into computer game modding), and it expects a color palette containing EXACTLY 216 entries (NOT 216 colors used and the remainder left black). Now I have a picture containing 18 colors and saved as a 24bit bitmap file. Now if I convert it to an 8 bit file in Image Analyzer it will make a palette containing 256 colors, of which, only 18 are used and the rest are black. This is not acceptable as the game crashes when it detects the wrong number of palette entries in the file. I need a way to MANUALLY set how many colors are in it, so I can manually set the number of palette entries in the BMP file to any number I choose (216 in this case). If a picture has more than that many colors Image Analyzer should approximate 216 colors to best match the colors in the picture. If I start with a picture containing less than 216 colors, Image Analyzer should add black filled palette entries to make the total be 216 colors. But 216 just is for one of the pictures in the game. Some of the pictures the game loads use 192 colors, or even all 256 colors. So I need the EXACT number of palette entries to be user settable to any value between 2 and 256, so that when I save an 8 bit bitmap file from Image Analyzer, it will contain EXACTLY the number of color palette entries that I specify.

Why not just use Photoshop (after all, I have it)? Well I'm looking to make an online tutorial on a gaming website explaining how anybody, even someone who's on a "limited budget", can edit this game using free software (Photoshop costs a ton of money if you get it legally, and I DON'T plan to encourage software piracy in my tutorial). So for this tutorial I need FREE software that can do what I just described in my previous paragraph here. That's where your program Image Analyzer comes in. Unfortunately it can't do what I've just described, so I am requesting that you add that functionality to it.

Last edited by Ben321 (2009-07-31 1:41:45)

Re: What's yet to come in Image Analyzer?

OK, I see your point but it is not something I have any use for so it is not likely that I will spend time on it. Sorry.

Michael Vinther

> software developer <

Re: What's yet to come in Image Analyzer?

admin wrote:

OK, I see your point but it is not something I have any use for so it is not likely that I will spend time on it. Sorry.

Why wouldn't you find it useful? Even for something not for a specific application, it can still save harddrive space by reducing the file size of BMP files. This is especially important for files that have small picture sizes, as the image data is actually small compared to the palette entries.

You see, in an 8-bit BMP file, a palette entry takes 4 bytes:
B=Blue
G=Green
R=Red
X=Unused

So 256 palette entries takes 256*4=1024 bytes. But each pixel of image data only takes 1 byte. So 1024 bytes is the same size as a 32x32 picture's image data. If you only are using for example, 20 colors, then you don't need to waste 944 bytes on unused palette entries in your bitmap file. In Photoshop for example when converting to an 8-bit image, you can mark unused palette entries as actually unused, not just the color black. This way, when saving the image as a file that stores the color palette (such as a BMP file), it doesn't waste file space.

Re: What's yet to come in Image Analyzer?

If I want to save hard disk space, I use PNG smile

Michael Vinther

> software developer <

Re: What's yet to come in Image Analyzer?

admin wrote:

If I want to save hard disk space, I use PNG smile

Ok. But what if you needed an 8bit BMP file for some reason (such as another program was expecting it as input), but wanted to save space by removing any unused color palette entries? Wouldn't you then find such a feature useful? Or what if a particular program was expecting a BMP file with an EXACT specific number of palette entries, wouldn't you then find such a feature useful?

Re: What's yet to come in Image Analyzer?

Yes, I would, but I don't have such a need...

Michael Vinther

> software developer <

Re: What's yet to come in Image Analyzer?

Well if you primarily use it for yourself (to the point you won't implement a feature someone else suggests if it won't directly help you) then why do you even have the program available to the public as downloadable?

Last edited by Ben321 (2009-08-15 7:09:22)

Re: What's yet to come in Image Analyzer?

Good point. I also ask myself that question sometimes...
Actually I do get a lot of suggestions for features that I find interesting or that I could also use myself but just haven't thought of. Also, I sometimes make a little money on implementing features that people want to pay for.

Michael Vinther

> software developer <