Package org.apache.commons.imaging
Class ImagingParameters<E extends ImagingParameters<E>>
- java.lang.Object
-
- org.apache.commons.imaging.ImagingParameters<E>
-
- Type Parameters:
E- This type
- Direct Known Subclasses:
BmpImagingParameters,IcnsImagingParameters,IcoImagingParameters,PcxImagingParameters,PnmImagingParameters,PsdImagingParameters,RgbeImagingParameters,WbmpImagingParameters,XbmImagingParameters,XmpImagingParameters,XpmImagingParameters
public class ImagingParameters<E extends ImagingParameters<E>> extends java.lang.ObjectImaging parameters.Contains parameters that are common to all formats. Implementations must include the specific parameters for each image format.
- Since:
- 1.0-alpha3
-
-
Field Summary
Fields Modifier and Type Field Description private BufferedImageFactorybufferedImageFactoryCreatesBufferedImages.private java.lang.StringfileNameAn optional file name, used for the description of input streams where a file name would be hard (or not possible) to be identified.private PixelDensitypixelDensityParameter key.private booleanstrictWhether to throw an exception when any issue occurs during reading or writing a file format.
-
Constructor Summary
Constructors Constructor Description ImagingParameters()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EasThis()Returns this instance typed as the subclass typeE.BufferedImageFactorygetBufferedImageFactory()java.lang.StringgetFileName()PixelDensitygetPixelDensity()booleanisStrict()EsetBufferedImageFactory(BufferedImageFactory bufferedImageFactory)EsetFileName(java.lang.String fileName)EsetPixelDensity(PixelDensity pixelDensity)EsetStrict(boolean strict)
-
-
-
Field Detail
-
strict
private boolean strict
Whether to throw an exception when any issue occurs during reading or writing a file format. Default isfalse.
-
fileName
private java.lang.String fileName
An optional file name, used for the description of input streams where a file name would be hard (or not possible) to be identified. Default isnull.
-
bufferedImageFactory
private BufferedImageFactory bufferedImageFactory
CreatesBufferedImages. Default isnull.
-
pixelDensity
private PixelDensity pixelDensity
Parameter key. Used in write operations to indicate the desired pixel density (DPI), and/or aspect ratio.
-
-
Method Detail
-
asThis
public E asThis()
Returns this instance typed as the subclass typeE.This is the same as the expression:
(B) this
- Returns:
- this instance typed as the subclass type
E.
-
getBufferedImageFactory
public BufferedImageFactory getBufferedImageFactory()
-
getFileName
public java.lang.String getFileName()
-
getPixelDensity
public PixelDensity getPixelDensity()
-
isStrict
public boolean isStrict()
-
setBufferedImageFactory
public E setBufferedImageFactory(BufferedImageFactory bufferedImageFactory)
-
setFileName
public E setFileName(java.lang.String fileName)
-
setPixelDensity
public E setPixelDensity(PixelDensity pixelDensity)
-
setStrict
public E setStrict(boolean strict)
-
-