本文整理汇总了Java中com.sun.imageio.plugins.jpeg.JPEG类的典型用法代码示例。如果您正苦于以下问题:Java JPEG类的具体用法?Java JPEG怎么用?Java JPEG使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
JPEG类属于com.sun.imageio.plugins.jpeg包,在下文中一共展示了JPEG类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: JPEGImageWriteParam
import com.sun.imageio.plugins.jpeg.JPEG; //导入依赖的package包/类
/**
* Constructs a <code>JPEGImageWriteParam</code>. Tiling is not
* supported. Progressive encoding is supported. The default
* progressive mode is MODE_DISABLED. A single form of compression,
* named "JPEG", is supported. The default compression quality is
* 0.75.
*
* @param locale a <code>Locale</code> to be used by the
* superclass to localize compression type names and quality
* descriptions, or <code>null</code>.
*/
public JPEGImageWriteParam(Locale locale) {
super(locale);
this.canWriteProgressive = true;
this.progressiveMode = MODE_DISABLED;
this.canWriteCompressed = true;
this.compressionTypes = compressionNames;
this.compressionType = compressionTypes[0];
this.compressionQuality = JPEG.DEFAULT_QUALITY;
}
示例2: unsetCompression
import com.sun.imageio.plugins.jpeg.JPEG; //导入依赖的package包/类
/**
* Removes any previous compression quality setting.
*
* <p> The default implementation resets the compression quality
* to <code>0.75F</code>.
*
* @exception IllegalStateException if the compression mode is not
* <code>MODE_EXPLICIT</code>.
*/
public void unsetCompression() {
if (getCompressionMode() != MODE_EXPLICIT) {
throw new IllegalStateException
("Compression mode not MODE_EXPLICIT!");
}
this.compressionQuality = JPEG.DEFAULT_QUALITY;
}
示例3: JPEGImageWriteParam
import com.sun.imageio.plugins.jpeg.JPEG; //导入依赖的package包/类
/**
* Constructs a {@code JPEGImageWriteParam}. Tiling is not
* supported. Progressive encoding is supported. The default
* progressive mode is MODE_DISABLED. A single form of compression,
* named "JPEG", is supported. The default compression quality is
* 0.75.
*
* @param locale a {@code Locale} to be used by the
* superclass to localize compression type names and quality
* descriptions, or {@code null}.
*/
public JPEGImageWriteParam(Locale locale) {
super(locale);
this.canWriteProgressive = true;
this.progressiveMode = MODE_DISABLED;
this.canWriteCompressed = true;
this.compressionTypes = compressionNames;
this.compressionType = compressionTypes[0];
this.compressionQuality = JPEG.DEFAULT_QUALITY;
}
示例4: unsetCompression
import com.sun.imageio.plugins.jpeg.JPEG; //导入依赖的package包/类
/**
* Removes any previous compression quality setting.
*
* <p> The default implementation resets the compression quality
* to {@code 0.75F}.
*
* @exception IllegalStateException if the compression mode is not
* {@code MODE_EXPLICIT}.
*/
public void unsetCompression() {
if (getCompressionMode() != MODE_EXPLICIT) {
throw new IllegalStateException
("Compression mode not MODE_EXPLICIT!");
}
this.compressionQuality = JPEG.DEFAULT_QUALITY;
}