[Suggestion] Improvements on the Change Color Depth action

XnConvert Multi Platform - Windows, MacOSX, Linux
Post Reply
sd_snatcher
Posts: 31
Joined: Sat Sep 10, 2016 11:29 pm

[Suggestion] Improvements on the Change Color Depth action

Post by sd_snatcher » Sun Dec 31, 2017 2:01 pm

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: 31938
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

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

Post by xnview » Mon Jan 01, 2018 1:03 pm

sd_snatcher wrote: [*]Add positioned dithering
Ordered dithering is always used
Pierre.

sd_snatcher
Posts: 31
Joined: Sat Sep 10, 2016 11:29 pm

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

Post by sd_snatcher » Tue Jan 23, 2018 1:17 am

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: 31
Joined: Sat Sep 10, 2016 11:29 pm

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

Post by sd_snatcher » Fri Sep 21, 2018 8:11 pm

Is it possible to have GIMP .gpl palette support on the change color depth action?

User avatar
xnview
Author of XnView
Posts: 31938
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

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

Post by xnview » Mon Sep 24, 2018 11:22 am

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: 31
Joined: Sat Sep 10, 2016 11:29 pm

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

Post by sd_snatcher » Tue Sep 25, 2018 1:31 am

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: 31
Joined: Sat Sep 10, 2016 11:29 pm

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

Post by sd_snatcher » Fri Nov 01, 2019 12:10 am

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