Class JPEGOutputDevice
- java.lang.Object
-
- com.levigo.jadice.server.ghostscript.OutputDevice
-
- com.levigo.jadice.server.ghostscript.ImageOutputDevice
-
- com.levigo.jadice.server.ghostscript.JPEGOutputDevice
-
- All Implemented Interfaces:
Serializable
public class JPEGOutputDevice extends ImageOutputDevice
An OutputDevice generating JPEG images.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JPEGOutputDevice.JPEGType
This enum determines the type of JPEG that is generated.
-
Constructor Summary
Constructors Constructor Description JPEGOutputDevice()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getGhostscriptOutputDeviceName()
String
getOutputMimeType()
int
getQuality()
JPEGOutputDevice.JPEGType
getType()
void
setQuality(int quality)
Set the quality factor to use (integer from 0 to 100, default 75).void
setType(JPEGOutputDevice.JPEGType type)
Set the type of JPEG to generate.-
Methods inherited from class com.levigo.jadice.server.ghostscript.ImageOutputDevice
fillOptions, getGraphicsAlphaBits, getTextAlphaBits, getXResolution, getYResolution, setGraphicsAlphaBits, setResolution, setTextAlphaBits, setXResolution, setYResolution
-
-
-
-
Method Detail
-
getType
public JPEGOutputDevice.JPEGType getType()
- Returns:
- the type of JPEG to generate.
-
setType
public void setType(JPEGOutputDevice.JPEGType type)
Set the type of JPEG to generate.- Parameters:
type
- theJPEG compression type
-
getGhostscriptOutputDeviceName
protected String getGhostscriptOutputDeviceName()
- Specified by:
getGhostscriptOutputDeviceName
in classOutputDevice
-
getQuality
public int getQuality()
- Returns:
- The quality factor to use
- See Also:
setQuality(int)
-
setQuality
public void setQuality(int quality)
Set the quality factor to use (integer from 0 to 100, default 75). Set the quality level according to the widely used IJG quality scale, which balances the extent of compression against the fidelity of the image when reconstituted. Lower values drop more information from the image to achieve higher compression, and therefore have lower quality when reconstituted.- Parameters:
quality
- the quality factor (must be in range [0…100])
-
getOutputMimeType
public String getOutputMimeType()
- Specified by:
getOutputMimeType
in classOutputDevice
-
-