Jump to content
How to Install Plugins ×

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


jxp

Recommended Posts

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

 

Download >> LowColor.zip

 

Don't know what plugin to use? Try looking in the plugin gallery

Link to comment
Share on other sites

  • 3 weeks later...

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?

Link to comment
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.

Don't know what plugin to use? Try looking in the plugin gallery

Link to comment
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:

Link to comment
Share on other sites

  • 4 weeks later...

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!

Link to comment
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.

Link to comment
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.

Don't know what plugin to use? Try looking in the plugin gallery

Link to comment
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

Link to comment
Share on other sites

  • 3 weeks later...

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.

Link to comment
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.

Don't know what plugin to use? Try looking in the plugin gallery

Link to comment
Share on other sites

  • 1 month later...

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?

Link to comment
Share on other sites

  • 4 weeks later...
  • 1 month later...

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.

Link to comment
Share on other sites

  • 4 weeks later...

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.

Link to comment
Share on other sites

  • 4 weeks later...
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!

Don't know what plugin to use? Try looking in the plugin gallery

Link to comment
Share on other sites

I don't have another means of creating a 16-bit .png myself, or I might be using that method instead of Paint. But, one of the things I was trying to do with it was use the image to create a terrain map for a 3-D program. This one requires 16-bit grayscale .pngs. Attached is one of the default images included in the program.

42132_9aac316f9fdb4976ec445eab3f36fb41

Link to comment
Share on other sites

  • 4 months later...

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 see this bug, too. It happens every time I save _the last unsaved_ image with less than 65536 colors (i.e., when no other unsaved files left!). The file is saved correctly. The program doesn't seem to hang, the semi-transpatent tool windows continue to react when I hover the mouse over them, though no controls react to interaction. If I use the task manager to close the program, it is closed instantly as if I would close it normally (as no unsaved files left). Seems like it tries to show a modal dialog box but forgets to bring it to front (and it's hidden behind the main program window). A say so because if you open a "Save as" dialog and try to interact with the main window you will get the same result except that the "Save as" dialog may be navigated with the Tab key and closed with the Esc key.

Link to comment
Share on other sites

  • 2 years later...

I get that same bug at random, but more with low color .bmp images than with low color .png images (they do it too, at random). Luckily, so far it's frequency isn't frequent (for me).

Another bug that I get is that if I use the custom number of colors option on a picture that has several thousands of colors, & I choose 256 colors, it'll sometimes give me fewer than 256 colors instead. I consider that a minor bug, since if I used FastStone Image Viewer 4.6, & use it's option to reduce an image to 256 colors, it will reduce it to exactly 256 colors.

Edited by wakanasakai
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...