Barcode-Lib4J requires Java 11+

Enum Class «ImageColorModel»

java.lang.Object
java.lang.Enum<ImageColorModel>
de.vwsoft.barcodelib4j.image.ImageColorModel
All Implemented Interfaces:
Serializable, Comparable<ImageColorModel>, Constable

public enum ImageColorModel extends Enum<ImageColorModel>
Enumeration of supported color models (RGB, CMYK).

Defines the color models that can be used when exporting barcode images to vector formats (PDF and EPS). RGB is typically used for screen display and digital distribution, while CMYK is preferred for professional printing workflows.

Each color model has a unique integer ID which can be used for efficient storage in a file or database. The IDs are small positive integers (1-2) that can be safely cast to byte if needed. See getID() and valueOf(int id).

  • Enum Constant Details

    • RGB

      public static final ImageColorModel RGB
      Red-Green-Blue color model.
    • CMYK

      public static final ImageColorModel CMYK
      Cyan-Magenta-Yellow-Key color model.
  • Method Details

    • values

      public static ImageColorModel[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ImageColorModel valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • valueOf

      public static ImageColorModel valueOf(int id)
      Returns the enum constant of this class associated with the specified integer ID.
      Parameters:
      id - the ID of the enum constant to be returned
      Returns:
      the enum constant associated with the specified ID
      Throws:
      IllegalArgumentException - if this enum class has no constant associated with the specified ID
    • getID

      public int getID()
      Returns the integer ID associated with this color model.
      Returns:
      the integer ID associated with this color model
      See Also: