com.alibaba.simpleimage.util
类 ImageColorConvertHelper

java.lang.Object
  继承者 com.alibaba.simpleimage.util.ImageColorConvertHelper

public class ImageColorConvertHelper
extends Object


构造方法摘要
ImageColorConvertHelper()
           
 
方法摘要
static PlanarImage convert2sRGB(PlanarImage src)
           
static PlanarImage convertCMYK2RGB(PlanarImage src)
          JAI在读cmyk格式的时候分2种: CMYK的图形读取,JAI使用的RGBA的模式的, 因此,为了替换使用自己的Color Profile, 直接使用format的操作。
static PlanarImage convertGray2RGB(PlanarImage src)
          这个转灰度图像为RGB,利用公式 r = gray, g = gray, b = gray 来做的转换
static PlanarImage convertIndexColorModel2RGB(PlanarImage src)
           
static PlanarImage convertRGBA2RGB(PlanarImage src)
           为了降低存储空间, 没有必要保持jpeg alpha通道.
static PlanarImage generalColorConvert(PlanarImage src)
           
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

ImageColorConvertHelper

public ImageColorConvertHelper()
方法详细信息

convert2sRGB

public static PlanarImage convert2sRGB(PlanarImage src)

generalColorConvert

public static PlanarImage generalColorConvert(PlanarImage src)

convertCMYK2RGB

public static PlanarImage convertCMYK2RGB(PlanarImage src)
JAI在读cmyk格式的时候分2种:
 CMYK的图形读取,JAI使用的RGBA的模式的, 因此,为了替换使用自己的Color Profile, 直接使用format的操作。 
 
  • 如果cmyk自带了 ICC_Profile, 那么数据是不会被修改的。 这个情况下, 我们应该使用内置的Color Profile
  • 如果cmyk图形使用默认的ICC_Profile, 那么他使用内置的InvertedCMYKColorSpace, 这是时候颜色会发生反转
  • 参数:
    src - 任意颜色空间图形
    返回:
    ColorSpace.CS_sRGB 表示的BufferedImage

    convertIndexColorModel2RGB

    public static PlanarImage convertIndexColorModel2RGB(PlanarImage src)

    convertRGBA2RGB

    public static PlanarImage convertRGBA2RGB(PlanarImage src)
     为了降低存储空间, 没有必要保持jpeg alpha通道. 如果
     see: http://www.faqs.org/faqs/jpeg-faq/part1/section-12.html
     

    参数:
    src -
    返回:

    convertGray2RGB

    public static PlanarImage convertGray2RGB(PlanarImage src)
    这个转灰度图像为RGB,利用公式 r = gray, g = gray, b = gray 来做的转换

    参数:
    src -
    返回:


    Copyright © 2012–2015 Alibaba Group. All rights reserved.