Ximagic Quantizer

Home
Contact
Denoiser
    Download
    Usage
    Tutorial
    Examples
    Changelog
    License
Quantizer
    Download
    Usage
    Examples
    Changelog
    License
GrayDither
    Download
    Usage
    Examples
    Changelog
    License

Usage


screenshot

This plugin allows color reduction of RGB Color images.

The plugin have three main functions:

  • Ordered dithering
  • Quantization
  • Error dithering
Those three functions are performed in sequence and each one can be applied or not. At least one of Ordered dithering or Quantization must be selected.

Ordered dithering is the first step. It is not quantization error dependent as is the error dithering step. It can be used with or without further quantization.
  • Levels x Channel: The ordered quantization filter reduces levels of color of each channel. Each value can be from 2 to 256. When 256 is selected, the result is the same image
  • Ordered
    • Pattern: Select one from the values. There are diffusion and halftone patterns.
  • Ordered user defined
    • Pattern: Select one of the values.
    • Load Button to load an user threshold pattern from a file. The file must have the format explained in the user Threshold pattern (below).
    • Delete Button to delete the selected user threshold pattern
  • Calculated
    • Shape Circle
    • W Horizontal distance between center of shapes
    • H Vertical distance between center of shapes
  • Random
Quantization is the second step. To do the quantization we need a palette, which can be fixed or calculated with an algorithm
  • Fixed palette Select one of the available palettes
  • Calculated palette
    • Colors: can be from 2 (1 bit) to 4096 (12 bits) when colors are changed, bits are updated accordingly.
    • Bits: can be from 1 to 12. When bits are changed, number of colors area updated to match.
    • Methods
      • Uniform
        • Bits x Channel from 0 to 8. The sum of three values could not be greater than 12. When each value is changed, the value of total colors and bits are updated.
      • Popularity
        • Significative bits from 2 to 5. This algorithm is highly dependent of this value. When the number of colors is less so must be the value. For 256 colors usually the best results are obtained with 5 bits and with 16 colors usually the best value is 3.
      • Median Cut
        • Significative bits from 5 to 8. Usually to reduce calculation time and memory consumption, this method only uses some bits of the 8 bits per channel.
      • Octree
        • Significative bits from 5 to 8. Usually to reduce calculation time and memory consumption, this method only uses some bits of the 8 bits per channel.
        • Two pass The octree reduction can be done as the Octree is build, or after it is finished. With the two pass approach, the reduction is done after the Octree is finished, this gives better results but needs more memory.
      • Wu
      • Dennis Lee v3
      • Binary split
      • K-Means
      • NeuQuant (default method)
        • Sample factor from 1 to 8. To reduce calculation time the method can process only a fraction of the pixels in the image, with the value 1 it process all the pixels.
      • SColorQ This method includes dithering, don't select error dithering option.
        • Filtering size 3 or 5. Greater filter size mean better results but the calculation time increases geometrically.
        • Dithering level * 100. from 0 to > 100. Amount of dithering used. It is a % value but can be greater than 100. When the value is 0 the level is selected automatically.
Error Dithering is the third step and it can be selected only if Quantization is selected. There are two main methods, arrays and space filling curve
  • % Error propagation Value of error diffused default 100%.
  • Array
    • Methods
      • Floyd-Steinberg
      • Ulichney
      • Fan
      • Jarvis
      • Stucki
      • Sierra3
      • Sierra2
      • Sierra42A
    • Serpentine scan Select serpentine scan of image.
  • Space filling curve
    • Methods
      • Riemersma
    • Queue size Number of pixels remembered



user_threshold

User Threshold pattern

User Threshold patterns can be loaded from files with the appropriate format or from images.
After a pattern is loaded it remain stored until the user deletes it.
The maximum pattern size is 262144 (width*height)

To load from a file
  • The file format should be:

    [width] [height]
    [matrix row 1 values separated by blanks]
    [matrix row 2 values separated by blanks]
    ...
    [matrix row n values separated by blanks]
    An example file
  • Method
    • Start Ximagic Quantizer and push the load button in the user threshold line
    • In the load dialog fill the pattern name, select "from file", fill the file name and push the ok button
To load from an image
  • The 1st channel of the current transformed image in the plugin will be imported as a threshold matrix, it is recommended to use grayscale image although it must be converted to RGB before running the plugin
    Image of the pattern Diffusion 8x8
    Image of the pattern Halftone orthogonal 8x8
  • Method:
    • Open the threshold image in the editor.
    • Start Ximagic Quantizer.
    • Push the Load button in the user threshold line
    • In the load dialog, fill the pattern name, select from image, and push ok button.
    • When the image is loaded, a message box with the width and height of the pattern will appear.
    • The plugin will end. The image selected in the editor is the threshold and the plugin should end to allow the user to select another image.