Jump to content

Suggestion: Save gray images with ordered index palettes

Recommended Posts

The octree quantization works quiet well in general but for grayscale images it creates sometimes colors.

For grayscale images it would be great to get a switch to generate ordered fixed size palettes [(0,0,0), ... (255,255,255)] (i.e for saving to 8bit, 4bit, 1bit .bmp files).

Doing this allows a consumer to use the color index in the raster directly as the gray color value (without a lookup into the palette).


midoras signature.gif

Link to comment
Share on other sites

If only grayscale is used, then the image is already using <= 256 colors and there shouldn't be any colors


Are you running on 4.2.16 or on 4.3? There was a bug in 4.2.16.


Also, if you're testing this based on drawing gradients, the Gradient Tool uses some dithering to make the gradient look smoother and it does introduce other colors. Turn off antialiasing to disable that.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html


Link to comment
Share on other sites

Still on 4.2.16, there are to many open plugins in development on my side to do the switch now. But I will before publishing updates.

For grayscale I just use Black and White adjustment before save. To test impdf I need grayscale rasters which use colors in the ordered range [(0,0,0) .. (255,255,255)].
And I'm not able to get them. Typically they do not contain (0,0,0) and (255,255,255) and the order is random. I can patch the bmps but it would be just good to get raster where you could ignore the palette. PDFs can then use /DeviceGray tags.




midoras signature.gif

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.

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