Sign in to follow this  
Followers 0
jxp

Low Color Filetype (bmp, gif, png, tiff) [20091204]

36 posts in this topic

I started web development in the dial-up days. In those times every byte counted. Because of this I've developed a habit of using 16-color bitmap and gif files (when appropriate).

This file type plugin allows you to save images as 16 color bitmaps or gifs. Obvously full color photos will look terrible but simple logos and small grayscale images can look good (and save precious bytes :lol: ) . This plugin adds the options Bitmap (low color) and GIF (low color) to the save as type drop down. (and now png and tiff too)

Not massively useful but I wanted it and it was interesting developing them. A 16 color bitmap uses half the space for the image than a 256 color one (it also has a much smaller palette!). A 16 color gif is more efficient to compress with a lower number of colors.

Previous updates

Hidden Content:
UPDATE 28 July 2009

Renamed dll from 16Colors.dll to LowColor.dll

Use Paint.NET save configuration (displays file size and progress)

Added Black & White mode

Added Custom colors mode (2 - 256)

Added PNG support

Renamed file types to Bitmap (Low Color) from Bitmap (16 color) etc.

UPDATE 31 Aug 2009

Added transparency threshold for improved handling of transparent images

Added 16-bit option (65,000 colours) for BMP and PNG files

UPDATE 25 Sep 2009

Added Tiff support (for D_M_S in General Qs forum)

Changed bmp unused palette bits to 0 (for Monty Burns)

Changed 16-bit format to be recognized by Windows (for n0tbugme)

UPDATE 07 Oct 2009

Fixed stupid, stupid (stupid) bug for tall images

UPDATE 04 Dec 2009

Preserve DPI setting when saving

LowColor.zip

0

Share this post


Link to post
Share on other sites

Hi jxp,

I was impressed with your plugin, 'cause I have been looking for a program that can save files with a color palette with fewer colors, and of course, free of charge. The paint program that comes with the Windows is not useful for me, whereas Paint.net is far more confortable.

And I'm now wondering your plugin could allow me to save files with binary GIF format, that is, a GIF format with black and white only. If it is possible, would you please let me know?

0

Share this post


Link to post
Share on other sites

It doesn't currently support it explicitly (you could save a black and white image as a 16 color gif). I'll have a look at extending my plugin for you.

0

Share this post


Link to post
Share on other sites

Sorry that it took me so long to get back to you.

By the way, thank you very much for preparing such a useful plug-in!

Your second version covers what I expected!

In addition to expanding supporting filetypes of Paint.net, you have changed usability of the plug-in to a more user-friendly manner.

It really improves the very basic compatibility aspect of Paint.net!!

Thank you JXP!!

:wink:

0

Share this post


Link to post
Share on other sites

Hey jxp, when I first saw this filetype plugin, I thought it would finally be possible to save "16 Bit Depth" value BMP files with PDN... but I quickly realized that I couldn't, I could only get a "4 Bit Depth" value when saving a BMP. :( Would it be possible to add an option to your filetype plugin that would allow the user to save BMP images with a "16 Bit Depth" value? If so, this would be great, Thanks!

0

Share this post


Link to post
Share on other sites

Some updates (as requested) see first post.

Added the 16-bit option for BMP and PNG file types.

Also improved transparancy options.

0

Share this post


Link to post
Share on other sites

Hi jxp. When I save an image with the new 16-bit option for BMP, in the "Summary" area of the BMP file Properties (when you right-click the file and select Properties), the Property of the "Bit Depth" Value is 32. The Bit Depth of the BMP file that I am trying to get, shows up in the Summary section of the Properties as a Value of 16, exactly like when you would save a BMP file in Photoshop when you select (the radio button) 16 as the type of output file.

0

Share this post


Link to post
Share on other sites

n0tbugme,

Yeah I saw that too. As the file was smaller than a 24 bit bitmap I assumed it was just Windows mis-reporting the bit depth.

I don't have access to Photoshop. Could you do a very small sample (e.g. 10px by 10px) image for me and I will try to determine the difference.

0

Share this post


Link to post
Share on other sites

hi jxp,

first of all thank you very much for this really useful plugin. I've been searching for it for a long, long time.

I often work with 1-bit depth BMP images (Black/White).

I noticed a little thing that brings to some visualization problems if I use some programs: in the BMP file the color table is saved as an array of 32 bit integers (8 bits for Red, 8 bits for Green and 8 bits for Blue, then other 8 bits for reserved purpose). This reserved bits are set to 0xFF, but if I'm right they should be set to 0.

see http://www.warpspeed.com.au/cgi-bin/inf2html.cmd?..\html\book\Toolkt40\MMREF3.INF+2255

0

Share this post


Link to post
Share on other sites

With so many updates, might I suggest the date of the latest update placed in the topic title? It eases user consumption.

Would that be okay?

Everything else looks in tip-top order, well done, jxp. :)

0

Share this post


Link to post
Share on other sites

Thanks for the update jxp! :D This Filetype Plugin of yours should be part of PDN.

Oh! While using your Plugin, I came across a bug (error). Here is a simple way to reproduce it:

1) Set the size of a blank canvas (doesn't have to be blank, the bug shows up either way) to "256 x 384". (I haven't tried other sizes, but I'm sure the bug might show up again in a different resolution.)

2) Click "File > Save As..."

3) Use any "Low color" Save as type. I used "Bitmap (Low color) (*.bmp)".

Now, in the Save Configuration window, there is no preview of the image. And at the top where it normally says the size of the image, it says "Preview. file size (error)". If you were to click "OK" to save the image when this error occurred in the Save Configuration window, the saved file would not have any data of the image within it, therefore, it would be blank and with a different resolution.

0

Share this post


Link to post
Share on other sites

The error seems to be when the picture is taller than it is wide. I've always used screen sizes (or square) for my testing. I'll investigate.

EDIT: This was a really stupid typo. I was using the height to check things across the width. Now fixed, new dll in first post.

0

Share this post


Link to post
Share on other sites

Hi - nice work on this plug-in. The fix from October solved an issue I was often having as well.

I am researching an issue that you might be able to confirm. Saving as a low-color TIF, it appears that the image will always revert to 96-DPI. Does that sound possible?

0

Share this post


Link to post
Share on other sites

Hi!

I got a problem with your plugin. As you can see in the screenshot i got no "low color" entries in drop down menu.

The dll is in the Effects folder and i restarted Paint.NET. I don't know what to do. I searched a long time to find this plugin and now it don't work.

My System: WinXP SP3, Paint.NET 3.5.1, Framework 3.5 SP1

Screenshot:

screen.th.jpg

EDIT//

There is no content at "Plugin Load Error".

0

Share this post


Link to post
Share on other sites
The dll is in the Effects folder and i restarted Paint.NET.

It should be in the FileTypes folder.

0

Share this post


Link to post
Share on other sites
It should be in the FileTypes folder.

I feel so silly. Thank you very much. The problem is solved.

0

Share this post


Link to post
Share on other sites

I use this plugin a lot, usually with PNGs. Sadly, there seems to be a bug. Sometimes, directly after the file is saved, the entire apllication freezes. You can't do anything, even the "X" to close Paint.NET doesn't work. Clicking the Paint.NET window results in error sounds. I always have to close Paint.NET via the Task Manager.

It happens frequently, but unforseen. There is no crash log, and I also failed to see a pattern in the behaviour. I really have no clue.

My system is Vista SP2, x86 Intel. I use the most recent version of Paint.NET.

I don't know wether the proplem is limited to me, but I suggest all other users to save all open files in a default format (PNG for single layer, PDN for multi layer files) before you use this filetype plugin. Otherwise you may face data loss.

I want to say that I'm very fond of this plugin and will continue to use it in spite of the bug. Thanks.

0

Share this post


Link to post
Share on other sites

Thanks for the plug-in. I'm sorry to say that it's not working for me though. When I go to file properties, it says that the 16 bit (65000 color) .png files are 32 bit depth files, which won't work for my purposes. The .bmp are actually saving as 16 bit images though.

0

Share this post


Link to post
Share on other sites

It's great. I really like the dithering option.

I use this to convert graphics for use on my mobile, which is 16-bit. Could you provide 16-bit JPG support if possible?

0

Share this post


Link to post
Share on other sites
Thanks for the plug-in. I'm sorry to say that it's not working for me though. When I go to file properties, it says that the 16 bit (65000 color) .png files are 32 bit depth files, which won't work for my purposes. The .bmp are actually saving as 16 bit images though.

The files are actually 16-bit (you can tell because they are smaller than 24-bit versions). There are different variants of 16-bit though. I've managed to get the right one for bitmaps now. Have you seen a "proper" 16-bit png? Can you provide me with a sample? I had a quick look in Photoshop but the 16-bit option seemed to be 64-bit PNG (i.e. 16-bits per channel, not 16 per pixel).

I use this plugin a lot, usually with PNGs. Sadly, there seems to be a bug. Sometimes, directly after the file is saved, the entire apllication freezes. You can't do anything, even the "X" to close Paint.NET doesn't work. Clicking the Paint.NET window results in error sounds. I always have to close Paint.NET via the Task Manager.

I also had this behaviour the other day. I will try and look at this soon and fix the problem. I think there something I'm doing that is incompatible with Paint.NET 3.5 (This issue never occurred previously). I'm very busy with other things so it may take me a while. Sorry!

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0