Jump to content

How edit palette in 256 BMP ?


Robbyb71

Recommended Posts

Hello,

I have to convert a 24 bit BMP in a 256 color BMP, but the palette in 256 color image, must have the first 16 colors with Windows standard colors.

I haven't found how to do this ... If i use 'Save with name' + bmp and then i select 8 bit deep, the palette in the image has not the Windows default colors.

Can you help me ?

Thanks

Link to comment
Share on other sites

If you're winding down the number of colors from 24-bit to 256 then the most commonly used colors are going to be placed in the 256 color slots available.

Possible Workaround (I haven't tried this!): Enlarge the canvas and create 16 good sized rectangular areas. Fill these areas with the colors used in the Windows standard palette. Save as 256 color image. This should ensure that the colors you want should appear in the 256 color palette. Next reopen the saved image and crop off the extra rectangles. Save As.., (I'm assuming that the palette will persist thorough the crop and resave).

Link to comment
Share on other sites

The palette is recomputed every time you save it. There is no way to force it to use a specific palette. EER, your idea is creative :), but definitely won't accomplish anything :( .

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

Another damn fine idea shot down in its prime by a cruel fact boltbait.sad.png

Link to comment
Share on other sites

Many thanks to all for your reply !

Sorry for putting the topic in wrong area, but for me was a trouble ...

I have an application (Cobol compiler) that want a 256 bitmap for push buttons. The compiler substitute the gray 192,192,192 with transparent effect but only if the gray is in standard position (like windows standard palette). Otherwise the transparent trasformation fail.

The painter that I used before Paint.net, had a tool 'Convert to 256 colors' with the option 'Include Windows Colors'. If this option is checked, the first 16 colors of the palette are the Windows standard colors and the remaining 240 are used for the colors in the image (the nearest one if there is a conversion from 24 to 8 bit).

For us (I work in a software house) are very useful !

I love Paint.net, but without this option or a workaround to do it, I can't left other painter ... :-(

Thanks

Link to comment
Share on other sites

....The compiler substitute the gray 192,192,192 with transparent effect but only if the gray is in standard position (like windows standard palette). Otherwise the transparent trasformation fail.

If this is the only requirement that you need of the standard palette, why not manually edit the image file to change just that color?

I'm thinking that you could probably use a hex editor to change the color at position X to RGB 192,192,192.

From memory, the BMP file format uses a 54 byte header then a 1024 byte palette lookup table which holds the RGB values. More on the BMP 256 color format: http://www.fortunecity.com/skyscraper/windows/364/bmpffrmt.html

Link to comment
Share on other sites

If this is the only requirement that you need of the standard palette, why not manually edit the image file to change just that color?

I'm thinking that you could probably use a hex editor to change the color at position X to RGB 192,192,192.

Hello,

thanks for your reply.

Usually, i don't change the color at position 7 to RGB 192,192,192, because the the old painter put automatically the 16 Windows standard color in the first sixteen position of the palette.

If I could modify the color in the 7 position of the palette on 256 bitmap images, the problem is solved.

But in Paint.NET I didn't found nothing to do this (correct me if it is wrong).

Yesterday I find a filetype plugin to downgrade the colors to 8 bit and also to x colors (LowColors is the name of the plugin), but there are no options to include windows standard colors in first 16 position.

Including the 16 standard windows color in the palette of 256 BMP is probably only a problem for me, but if it was a plugin that can modify the single color palette, i think that will be intersting for many others ... or not ? ;)

Have a nice day B)

Link to comment
Share on other sites

Well, you can learn them, yes?

Unfortunately I haven't many time to do this. The 256 bitmap are a 0,01% of my job, therefore I can't spend many time for this. :(

Otherwise, I can try to do this in my free time ... can you tell me where I can find a documentation for beginners ? :roll:

Thanks

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...