类sun.awt.image.codec.JPEGParam源码实例Demo

下面列出了怎么用sun.awt.image.codec.JPEGParam的API类实例代码及写法,或者点击链接到github查看源代码。


/**
  * This is a factory method for creating JPEGEncodeParam objects.
  * It is the users responsiblity to match the colorID with the
  * data contained in the Raster.  Failure to do so may lead to
  * either poor compression or poor image quality.  If you don't
  * understand much about JPEG it is strongly recommended that you
  * stick to the BufferedImage interface.
  * @param ras Raster that is similar to those to be encoded later.
  * @param colorID the COLOR_ID for the encoded data.  This should
  *        match the data in the raster.
  */
public static JPEGEncodeParam getDefaultJPEGEncodeParam(Raster ras,
                                                        int colorID)
{
JPEGParam ret = new JPEGParam(colorID, ras.getNumBands());
ret.setWidth(ras.getWidth());
ret.setHeight(ras.getHeight());

return ret;
}
 

/**
  * This is a factory method for creating JPEGEncodeParam objects.  It
  * is the users responsiblity to match the colorID with the given
  * number of bands, which should match the data being encoded.
  * Failure to do so may lead to poor compression and/or poor image
  * quality.  If you don't understand much about JPEG it is strongly
  * recommended that you stick to the BufferedImage interface.
  *
  * This can also be used as a factory for a JPEGDecodeParam object.
  * However this usage is extremely rare, as one needs to be decoding
  * abbreviated JPEG streams where the JPEG tables are coming from
  * some source other than a JPEG tables only stream.
  *
  * @param numBands the number of bands that will be encoded (max of four).
  * @param colorID the COLOR_ID for the encoded data.  This is used to
  * set reasonable defaults in the parameter object.  This must match
  * the number of bands given.
  */
public static JPEGEncodeParam getDefaultJPEGEncodeParam(int numBands,
                                                        int colorID)
    throws ImageFormatException
{
return new JPEGParam(colorID, numBands);
}
 
源代码3 项目: oim-fx   文件: JPEGCodec.java

/**
  * This is a factory method for creating JPEGEncodeParam objects.
  * It is the users responsiblity to match the colorID with the
  * data contained in the Raster.  Failure to do so may lead to
  * either poor compression or poor image quality.  If you don't
  * understand much about JPEG it is strongly recommended that you
  * stick to the BufferedImage interface.
  * @param ras Raster that is similar to those to be encoded later.
  * @param colorID the COLOR_ID for the encoded data.  This should
  *        match the data in the raster.
  */
public static JPEGEncodeParam getDefaultJPEGEncodeParam(Raster ras,
                                                       	int colorID)
{
 	JPEGParam ret = new JPEGParam(colorID, ras.getNumBands());
 	ret.setWidth(ras.getWidth());
 	ret.setHeight(ras.getHeight());

 	return ret;
}
 
源代码4 项目: oim-fx   文件: JPEGCodec.java

/**
  * This is a factory method for creating JPEGEncodeParam objects.  It
  * is the users responsiblity to match the colorID with the given
  * number of bands, which should match the data being encoded.
  * Failure to do so may lead to poor compression and/or poor image
  * quality.  If you don't understand much about JPEG it is strongly
  * recommended that you stick to the BufferedImage interface.
  *
  * This can also be used as a factory for a JPEGDecodeParam object.
  * However this usage is extremely rare, as one needs to be decoding
  * abbreviated JPEG streams where the JPEG tables are coming from
  * some source other than a JPEG tables only stream.
  *
  * @param numBands the number of bands that will be encoded (max of four).
  * @param colorID the COLOR_ID for the encoded data.  This is used to
  * set reasonable defaults in the parameter object.  This must match
  * the number of bands given.
  */
public static JPEGEncodeParam getDefaultJPEGEncodeParam(int numBands,
                                                               int colorID)
           throws ImageFormatException
{
 	return new JPEGParam(colorID, numBands);
}
 
源代码5 项目: JDKSourceCode1.8   文件: JPEGCodec.java

/**
  * This is a factory method for creating JPEGEncodeParam objects.
  * It is the users responsiblity to match the colorID with the
  * data contained in the Raster.  Failure to do so may lead to
  * either poor compression or poor image quality.  If you don't
  * understand much about JPEG it is strongly recommended that you
  * stick to the BufferedImage interface.
  * @param ras Raster that is similar to those to be encoded later.
  * @param colorID the COLOR_ID for the encoded data.  This should
  *        match the data in the raster.
  */
public static JPEGEncodeParam getDefaultJPEGEncodeParam(Raster ras,
                                                        int colorID)
{
JPEGParam ret = new JPEGParam(colorID, ras.getNumBands());
ret.setWidth(ras.getWidth());
ret.setHeight(ras.getHeight());

return ret;
}
 
源代码6 项目: JDKSourceCode1.8   文件: JPEGCodec.java

/**
  * This is a factory method for creating JPEGEncodeParam objects.  It
  * is the users responsiblity to match the colorID with the given
  * number of bands, which should match the data being encoded.
  * Failure to do so may lead to poor compression and/or poor image
  * quality.  If you don't understand much about JPEG it is strongly
  * recommended that you stick to the BufferedImage interface.
  *
  * This can also be used as a factory for a JPEGDecodeParam object.
  * However this usage is extremely rare, as one needs to be decoding
  * abbreviated JPEG streams where the JPEG tables are coming from
  * some source other than a JPEG tables only stream.
  *
  * @param numBands the number of bands that will be encoded (max of four).
  * @param colorID the COLOR_ID for the encoded data.  This is used to
  * set reasonable defaults in the parameter object.  This must match
  * the number of bands given.
  */
public static JPEGEncodeParam getDefaultJPEGEncodeParam(int numBands,
                                                        int colorID)
    throws ImageFormatException
{
return new JPEGParam(colorID, numBands);
}
 

/**
  * This is a factory method for creating JPEGEncodeParam objects.
  * The returned object should do a credible job of encoding the
  * given BufferedImage.
  * @param bi A BufferedImage that is similar to the BufferedImage(s)
  * that will encoded using the returned JPEGEncodeParam object.
  */
public static JPEGEncodeParam getDefaultJPEGEncodeParam(BufferedImage bi)
{
int colorID = JPEGParam.getDefaultColorId(bi.getColorModel());
return getDefaultJPEGEncodeParam(bi.getRaster(), colorID);
}
 

/**
 * This is a factory method for creating a JPEGEncodeParam from a
 * JPEGDecodeParam.  This will return a new JPEGEncodeParam object
 * that is initialized from the JPEGDecodeParam object.  All major
 * pieces of information will be initialized from the DecodeParam
 * (Markers, Tables, mappings).
 * @param jdp The JPEGDecodeParam object to copy.
 */

public static JPEGEncodeParam getDefaultJPEGEncodeParam(JPEGDecodeParam jdp)
    throws ImageFormatException {
    return new JPEGParam(jdp);
}
 
源代码9 项目: oim-fx   文件: JPEGCodec.java

/**
  * This is a factory method for creating JPEGEncodeParam objects.
  * The returned object should do a credible job of encoding the
  * given BufferedImage.
  * @param bi A BufferedImage that is similar to the BufferedImage(s)
  * that will encoded using the returned JPEGEncodeParam object.
  */
public static JPEGEncodeParam getDefaultJPEGEncodeParam(BufferedImage bi)
{
 	int colorID = JPEGParam.getDefaultColorId(bi.getColorModel());
 	return getDefaultJPEGEncodeParam(bi.getRaster(), colorID);
}
 
源代码10 项目: oim-fx   文件: JPEGCodec.java

/**
 * This is a factory method for creating a JPEGEncodeParam from a
 * JPEGDecodeParam.  This will return a new JPEGEncodeParam object
 * that is initialized from the JPEGDecodeParam object.  All major
 * pieces of information will be initialized from the DecodeParam
 * (Markers, Tables, mappings).
 * @param jdp The JPEGDecodeParam object to copy.
 */

public static JPEGEncodeParam getDefaultJPEGEncodeParam(JPEGDecodeParam jdp)
    throws ImageFormatException {
    return new JPEGParam(jdp);
}
 
源代码11 项目: JDKSourceCode1.8   文件: JPEGCodec.java

/**
  * This is a factory method for creating JPEGEncodeParam objects.
  * The returned object should do a credible job of encoding the
  * given BufferedImage.
  * @param bi A BufferedImage that is similar to the BufferedImage(s)
  * that will encoded using the returned JPEGEncodeParam object.
  */
public static JPEGEncodeParam getDefaultJPEGEncodeParam(BufferedImage bi)
{
int colorID = JPEGParam.getDefaultColorId(bi.getColorModel());
return getDefaultJPEGEncodeParam(bi.getRaster(), colorID);
}
 
源代码12 项目: JDKSourceCode1.8   文件: JPEGCodec.java

/**
 * This is a factory method for creating a JPEGEncodeParam from a
 * JPEGDecodeParam.  This will return a new JPEGEncodeParam object
 * that is initialized from the JPEGDecodeParam object.  All major
 * pieces of information will be initialized from the DecodeParam
 * (Markers, Tables, mappings).
 * @param jdp The JPEGDecodeParam object to copy.
 */

public static JPEGEncodeParam getDefaultJPEGEncodeParam(JPEGDecodeParam jdp)
    throws ImageFormatException {
    return new JPEGParam(jdp);
}
 
 类所在包
 类方法
 同包方法