[Suggestion] Improvements on the Change Color Depth action

XnConvert Multi Platform - Windows, MacOSX, Linux

Moderators: XnTriq, helmut, xnview

Post Reply
sd_snatcher
Posts: 39
Joined: Sat Sep 10, 2016 11:29 pm

[Suggestion] Improvements on the Change Color Depth action

Post by sd_snatcher »

Here goes some suggestions for improvements in the Change Color Depth action:
  • Add more color depths: 2 colors and 4 colors
  • Add positioned dithering
  • Add an option to sort the palette by Hue and Lightness. The colors would be sorted like this:
    • First, sorted by the higher 4 bits of the Hue, in ascending order. That creates groups of colors
    • Then, sort each group by lightness, in ascending order
User avatar
xnview
Author of XnView
Posts: 43326
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: [Suggestion] Improvements on the Change Color Depth action

Post by xnview »

sd_snatcher wrote: [*]Add positioned dithering
Ordered dithering is always used
Pierre.
sd_snatcher
Posts: 39
Joined: Sat Sep 10, 2016 11:29 pm

Re: [Suggestion] Improvements on the Change Color Depth action

Post by sd_snatcher »

You're right. I missed that "Bayer" = "ordered". Sorry for that.

I have another suggestion for the Change Color Depth action:

- Use a GIMP .gpl palette file for the palette. (note: the color order of the .gpl file must be preserved, and unused colors shouldn't be eliminated)
sd_snatcher
Posts: 39
Joined: Sat Sep 10, 2016 11:29 pm

Re: [Suggestion] Improvements on the Change Color Depth action

Post by sd_snatcher »

Is it possible to have GIMP .gpl palette support on the change color depth action?
User avatar
xnview
Author of XnView
Posts: 43326
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: [Suggestion] Improvements on the Change Color Depth action

Post by xnview »

sd_snatcher wrote: Fri Sep 21, 2018 8:11 pm Is it possible to have GIMP .gpl palette support on the change color depth action?
you would like to reduce colors by using a palette?
Pierre.
sd_snatcher
Posts: 39
Joined: Sat Sep 10, 2016 11:29 pm

Re: [Suggestion] Improvements on the Change Color Depth action

Post by sd_snatcher »

Exactly. :)

For example, to convert a set of images to a specific fixed palette. A way to limit to any arbitrary number colors within that palette would still be necessary.

This would allow images to be converted, for example, to the C64 palette, or the Atari ST palette.

Also, any of the palettes of this site could be easily used, or any other user-built palette too.

Since some of these machines (like the ZX-Spectrum and MSX) have fixed palettes, a checkbox to force it use the exact same color number from the palette would also be necessary.
sd_snatcher
Posts: 39
Joined: Sat Sep 10, 2016 11:29 pm

Re: [Suggestion] Improvements on the Change Color Depth action

Post by sd_snatcher »

I found a bug in the Change Color Deph action.

When a dithering method is selected, the selected number of colors is most of the times ignored.

Steps to reproduce:

1) Add a 24bit color image to the list
2) Add the Change Color Depth action
3) Select Colors=64 and Dithering=Floyd Steinberg
4) Click on the Convert button
5) Use a software to count the number of colors (Gimp Colors->Info->Colorcube Analysis does that), and there will be 256 colors

It seems that it only supports 256, 16 or 8 colors, will try to fit the number of colors you selected under these three levels.

The problem is even worse for the Bayer dithering. Instead of a custom palette, it always generates a fixed procedurally generated palete (also for only 8, 16 or 256 colors).

It would be better if the palette was a separate (specific) combo-box, containing: "Auto" (best selection for that image), "Procedural" (similar to what the Bayer dithering now generates), "Gimp Palette" (from a .gpl file) and "From file" (from an existing PNG or GIF image)
Post Reply