Class CMYKImages

java.lang.Object
org.monte.media.image.CMYKImages

public class CMYKImages extends Object
Provides utility methods for images in the CMYK color space..
Author:
Werner Randelshofer
  • Field Details

  • Constructor Details

    • CMYKImages

      public CMYKImages()
  • Method Details

    • createImageFromYCCK

      public static BufferedImage createImageFromYCCK(Raster ycckRaster, ICC_Profile cmykProfile)
      Creates a CMYK image from a raster in the YCCK color space.
      Parameters:
      ycckRaster - A raster with (at least) 4 bands of samples.
      cmykProfile - this profile is assigned to the resulting CMYK image
      Returns:
      a BufferedImage in the CMYK color space
    • createImageFromInvertedYCCK

      public static BufferedImage createImageFromInvertedYCCK(Raster ycckRaster, ICC_Profile cmykProfile)
      Creates a buffered image from a raster in the inverted YCCK color space, converting the colors to RGB using the provided CMYK ICC_Profile.
      Parameters:
      ycckRaster - A raster with (at least) 4 bands of samples.
      cmykProfile - An ICC_Profile for conversion from the CMYK color space to the RGB color space. If this parameter is null, a default profile is used.
      Returns:
      a BufferedImage
    • createImageFromICCProfile

      public static BufferedImage createImageFromICCProfile(Raster raster, ICC_Profile profile)
      Creates a buffered image from a raster in the color space specified by the given ICC_Profile.
      Parameters:
      raster - A raster.
      profile - An ICC_Profile specifying the color space of the raster.
      Returns:
      a BufferedImage in the color space specified by the profile.
    • createImageFromCMYK

      public static BufferedImage createImageFromCMYK(Raster cmykRaster, ICC_Profile cmykProfile)
      Creates a buffered image from a CMYK raster using the provided CMYK ICC_Profile.
      Parameters:
      cmykRaster - A raster with (at least) 4 bands of samples.
      cmykProfile - An ICC_Profile in the CMYK color space. If this parameter is null, a default profile is used, and the returned image will be an RGB image. !!!! FIXME always create a CMYK image!
      Returns:
      a BufferedImage.
    • createImageFromInvertedCMYK

      public static BufferedImage createImageFromInvertedCMYK(Raster rgbwRaster, ICC_Profile cmykProfile)
      Creates a buffered image from a raster in the RGBW color space.

      As seen from a comment made by 'phelps' at http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4799903

      Parameters:
      rgbwRaster - A raster with inverted CMYK values (=RGBW).
      cmykProfile - An ICC_Profile. If this parameter is null, a default profile is used.
      Returns:
      a BufferedImage in the RGB color space.
    • createImageFromRGB

      public static BufferedImage createImageFromRGB(Raster rgbRaster, ICC_Profile rgbProfile)
    • createImageFromYCC

      public static BufferedImage createImageFromYCC(Raster yccRaster, ICC_Profile yccProfile)