midora Posted August 29, 2021 Share Posted August 29, 2021 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). Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted August 29, 2021 Share Posted August 29, 2021 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. Quote 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 More sharing options...
midora Posted August 29, 2021 Author Share Posted August 29, 2021 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. b Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted August 29, 2021 Share Posted August 29, 2021 You can use the portable version of 4.3. I can sort the colors before saving them, but you need to first see how 4.3 behaves. Quote 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 More sharing options...
midora Posted September 5, 2021 Author Share Posted September 5, 2021 JFI: I couldn't reproduce the issue with colored pixels after quantization of gray scale images using 4.30.7918 (portable version). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.