Package magick
Class ImageInfo
- java.lang.Object
-
- magick.Magick
-
- magick.ImageInfo
-
public class ImageInfo extends Magick
Corresponds to the ImageMagick ImageInfo structure.- Author:
- Eric Yeo
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidfinalize()To release memory on cleanup.intgetAdjoin()Get the adjoin attribute.booleangetAffirm()Get the affirm attribute.intgetAntialias()Get the antialias attribute.PixelPacketgetBorderColor()Get the current border colour..intgetColorspace()Get the colorspace attribute.intgetCompression()Get the compression attribute.java.lang.StringgetDensity()Get the density attribute.intgetDepth()Return the depth of the image.intgetDither()Get the dither attribute.java.lang.StringgetFileName()Return the file name attribute of the handle.java.lang.StringgetFont()Get the font attribute.doublegetFuzz()Get the fuzz attribute.intgetInterlace()Get the interlace attribute.java.lang.StringgetMagick()Return the magick attribute of the handle.intgetMonochrome()Get the monochrone attribute.java.lang.StringgetPage()Get the page attribute.booleangetPing()Get the ping attribute.intgetPointSize()Get the pointsize attribute.intgetPreviewType()Get the preview_type attribute.intgetQuality()Get the quality attribute.java.lang.StringgetServerName()Get the server_name attribute.java.lang.StringgetSize()Get the size attribute.intgetSubimage()Get the subimage attribute.intgetSubrange()Get the subrange attribute.java.lang.StringgetTexture()Get the texture attribute.java.lang.StringgetTile()Get the tile attribute.intgetUnits()Get the units attribute of the ImageInfo.intgetVerbose()Get the verbose attribute.java.lang.StringgetView()Get the view attribute.voidinit()Initialises the internal native handle.voidsetAdjoin(int value)Set the adjoin attribute.voidsetAffirm(boolean affirm)Set the affirm attribute.voidsetAntialias(int value)Set the antialias attribute.voidsetBorderColor(PixelPacket color)Set the border colour..voidsetColorspace(int value)Set the colorspace attribute.voidsetCompression(int value)Set the compression attribute.voidsetDensity(java.lang.String density)Set the density attribute.voidsetDepth(int depth)Set the depth of the image.voidsetDither(int value)Set the dither attribute.voidsetFileName(java.lang.String fileName)Set the file name attribute of the handle.voidsetFont(java.lang.String font)Set the font attribute.voidsetFuzz(double value)Set the fuzz attribute.voidsetImageOption(java.lang.String option, java.lang.String value)Associates a value with an image option.voidsetInterlace(int value)Set the interlace attribute.voidsetMagick(java.lang.String magick)Set the magick attribute of the handle.voidsetMonochrome(int value)Set the monochrome attribute.voidsetPage(java.lang.String page)Set the page attribute.voidsetPing(boolean value)Set the ping attribute.voidsetPointSize(int value)Set the pointsize attribute.voidsetPreviewType(int value)Set the preview_type attribute.voidsetQuality(int value)Set the quality attribute.voidsetServerName(java.lang.String name)Set the server_name attribute.voidsetSize(java.lang.String size)Set the size attribute.voidsetSubimage(int value)Set the subimage attribute.voidsetSubrange(int value)Set the subrange attribute.voidsetTexture(java.lang.String texture)Set the texture attribute.voidsetTile(java.lang.String tile)Set the tile attribute.voidsetUnits(int resolutionType)Set the units attribute of the ImageInfo.voidsetVerbose(int value)Set the verbose attribute.voidsetView(java.lang.String view)Set the view attribute.java.lang.StringtoString()-
Methods inherited from class magick.Magick
parseImageGeometry, queryFonts
-
-
-
-
Constructor Detail
-
ImageInfo
public ImageInfo() throws MagickExceptionConstructor.- Throws:
MagickException- if an error occurs
-
ImageInfo
public ImageInfo(java.lang.String fileName) throws MagickExceptionConstructor.- Parameters:
fileName- initial value of the file_name attribute- Throws:
MagickException- if an error occurs
-
-
Method Detail
-
finalize
protected void finalize()
To release memory on cleanup.- Overrides:
finalizein classjava.lang.Object
-
init
public void init() throws MagickExceptionInitialises the internal native handle.- Throws:
MagickException- if an error occurs
-
setFileName
public void setFileName(java.lang.String fileName) throws MagickExceptionSet the file name attribute of the handle.- Parameters:
fileName- the new file name- Throws:
MagickException- if an error occurs
-
setImageOption
public void setImageOption(java.lang.String option, java.lang.String value) throws MagickExceptionAssociates a value with an image option. Example:ImageInfo info = new ImageInfo(...) info.setImageOption("quantum:polarity", "min-is-white");This then ensures that our tiffs come out in a way that works with Microsofts Tiff Viewer.- Parameters:
option- the image optionvalue- the image option value- Throws:
MagickException- if an error occurs- Since:
- JMagick 6.4.3 (2008-08-05)
-
getFileName
public java.lang.String getFileName() throws MagickExceptionReturn the file name attribute of the handle.- Returns:
- the file name attribute value
- Throws:
MagickException- if an error occurs
-
setAffirm
public void setAffirm(boolean affirm) throws MagickExceptionSet the affirm attribute.- Parameters:
affirm- new value of affirm- Throws:
MagickException- if an error occurs
-
getAffirm
public boolean getAffirm() throws MagickExceptionGet the affirm attribute.- Returns:
- the affirm attribute value
- Throws:
MagickException- if an error occurs
-
setSubimage
public void setSubimage(int value) throws MagickExceptionSet the subimage attribute.- Parameters:
value- new value of subimage- Throws:
MagickException- if an error occurs
-
getSubimage
public int getSubimage() throws MagickExceptionGet the subimage attribute.- Returns:
- the subimage attribute value
- Throws:
MagickException- if an error occurs
-
setSubrange
public void setSubrange(int value) throws MagickExceptionSet the subrange attribute.- Parameters:
value- the new value of subrange- Throws:
MagickException- if an error occurs
-
getSubrange
public int getSubrange() throws MagickExceptionGet the subrange attribute.- Returns:
- the subrange attribute value
- Throws:
MagickException- if an error occurs
-
setServerName
public void setServerName(java.lang.String name) throws MagickExceptionSet the server_name attribute.- Parameters:
name- the new value of server_name- Throws:
MagickException- if an error occurs
-
getServerName
public java.lang.String getServerName() throws MagickExceptionGet the server_name attribute.- Returns:
- the server_name attribute value
- Throws:
MagickException- if an error occurs
-
setFont
public void setFont(java.lang.String font) throws MagickExceptionSet the font attribute.- Parameters:
font- the new value of font- Throws:
MagickException- if an error occurs
-
getFont
public java.lang.String getFont() throws MagickExceptionGet the font attribute.- Returns:
- the font attribute value
- Throws:
MagickException- if an error occurs
-
setSize
public void setSize(java.lang.String size) throws MagickExceptionSet the size attribute.- Parameters:
size- the new value of size- Throws:
MagickException- if an error occurs
-
getSize
public java.lang.String getSize() throws MagickExceptionGet the size attribute.- Returns:
- the size attribute value
- Throws:
MagickException- if an error occurs
-
setTile
public void setTile(java.lang.String tile) throws MagickExceptionSet the tile attribute.- Parameters:
tile- the new value of tile- Throws:
MagickException- if an error occurs
-
getTile
public java.lang.String getTile() throws MagickExceptionGet the tile attribute.- Returns:
- the tile attribute value
- Throws:
MagickException- if an error occurs
-
setDensity
public void setDensity(java.lang.String density) throws MagickExceptionSet the density attribute.- Parameters:
density- the new value of density- Throws:
MagickException- if an error occurs
-
getDensity
public java.lang.String getDensity() throws MagickExceptionGet the density attribute.- Returns:
- the density attribute value
- Throws:
MagickException- if an error occurs
-
setPage
public void setPage(java.lang.String page) throws MagickExceptionSet the page attribute.- Parameters:
page- the new value of page- Throws:
MagickException- if an error occurs
-
getPage
public java.lang.String getPage() throws MagickExceptionGet the page attribute.- Returns:
- the page attribute value
- Throws:
MagickException- if an error occurs
-
setTexture
public void setTexture(java.lang.String texture) throws MagickExceptionSet the texture attribute.- Parameters:
texture- the new value of texture- Throws:
MagickException- if an error occurs
-
getTexture
public java.lang.String getTexture() throws MagickExceptionGet the texture attribute.- Returns:
- the texture attribute value
- Throws:
MagickException- if an error occurs
-
setView
public void setView(java.lang.String view) throws MagickExceptionSet the view attribute.- Parameters:
view- the new value of view- Throws:
MagickException- if an error occurs
-
getView
public java.lang.String getView() throws MagickExceptionGet the view attribute.- Returns:
- the view attribute value
- Throws:
MagickException- if an error occurs
-
setAdjoin
public void setAdjoin(int value) throws MagickExceptionSet the adjoin attribute.- Parameters:
value- the new value of adjoin- Throws:
MagickException- if an error occurs
-
getAdjoin
public int getAdjoin() throws MagickExceptionGet the adjoin attribute.- Returns:
- the adjoin attribute value
- Throws:
MagickException- if an error occurs
-
setColorspace
public void setColorspace(int value) throws MagickExceptionSet the colorspace attribute.- Parameters:
value- the new value of colorspace- Throws:
MagickException- if an error occurs
-
getColorspace
public int getColorspace() throws MagickExceptionGet the colorspace attribute.- Returns:
- the colorspace attribute value
- Throws:
MagickException- if an error occurs
-
setCompression
public void setCompression(int value) throws MagickExceptionSet the compression attribute.- Parameters:
value- the new value of compression- Throws:
MagickException- if an error occurs
-
getCompression
public int getCompression() throws MagickExceptionGet the compression attribute.- Returns:
- the compression attribute value
- Throws:
MagickException- if an error occurs
-
setDither
public void setDither(int value) throws MagickExceptionSet the dither attribute.- Parameters:
value- the new value of dither- Throws:
MagickException- if an error occurs
-
getDither
public int getDither() throws MagickExceptionGet the dither attribute.- Returns:
- the dither attribute value
- Throws:
MagickException- if an error occurs
-
setAntialias
public void setAntialias(int value) throws MagickExceptionSet the antialias attribute.- Parameters:
value- the new value of antialias- Throws:
MagickException- if an error occurs
-
getAntialias
public int getAntialias() throws MagickExceptionGet the antialias attribute.- Returns:
- the antialias attribute value
- Throws:
MagickException- if an error occurs
-
setInterlace
public void setInterlace(int value) throws MagickExceptionSet the interlace attribute.- Parameters:
value- the new value of interlace- Throws:
MagickException- if an error occurs
-
getInterlace
public int getInterlace() throws MagickExceptionGet the interlace attribute.- Returns:
- the interlace attribute value
- Throws:
MagickException- if an error occurs
-
setMonochrome
public void setMonochrome(int value) throws MagickExceptionSet the monochrome attribute.- Parameters:
value- the new value of monochrome- Throws:
MagickException- if an error occurs
-
getMonochrome
public int getMonochrome() throws MagickExceptionGet the monochrone attribute.- Returns:
- the monochrone attribute value
- Throws:
MagickException- if an error occurs
-
setFuzz
public void setFuzz(double value) throws MagickExceptionSet the fuzz attribute.- Parameters:
value- the new value of fuzz- Throws:
MagickException- if an error occurs
-
getFuzz
public double getFuzz() throws MagickExceptionGet the fuzz attribute.- Returns:
- the fuzz attribute value
- Throws:
MagickException- if an error occurs
-
setPointSize
public void setPointSize(int value) throws MagickExceptionSet the pointsize attribute.- Parameters:
value- the new value of pointsize- Throws:
MagickException- if an error occurs
-
getPointSize
public int getPointSize() throws MagickExceptionGet the pointsize attribute.- Returns:
- the pointsize attribute value
- Throws:
MagickException- if an error occurs
-
setQuality
public void setQuality(int value) throws MagickExceptionSet the quality attribute.- Parameters:
value- the new value of quality- Throws:
MagickException- if an error occurs
-
getQuality
public int getQuality() throws MagickExceptionGet the quality attribute.- Returns:
- the quality attribute value
- Throws:
MagickException- if an error occurs
-
setVerbose
public void setVerbose(int value) throws MagickExceptionSet the verbose attribute. This makes writeImage print out information about the written image on standard output, like:TIFF Directory at offset 0x0 Image Width: 102 Image Length: 68 Resolution: 72, 72 pixels/inch Bits/Sample: 8 Compression Scheme: None Photometric Interpretation: RGB color FillOrder: msb-to-lsb Document Name: "test/output/black_and_White_In_RGBRGB.tif" Orientation: row 0 top, col 0 lhs Samples/Pixel: 3 Rows/Strip: 26 Planar Configuration: single image plane ICC Profile:, 560 bytes Software: ImageMagick 6.2.6 10/06/06 Q8 http://www.imagemagick.org Note: The verbose setting is primarily for use with the utility programs. it is equivalent to the -verbose option for ImageMagick command line tool. The delegates subsystem does observe verbose, which is why setting verbose to true causes some output when loading a PDF or PS file.
- Parameters:
value- the new verbosity value- Throws:
MagickException- if an error occurs- See Also:
MagickImage.writeImage(ImageInfo)
-
getVerbose
public int getVerbose() throws MagickExceptionGet the verbose attribute.- Returns:
- verbosity
- Throws:
MagickException- if an error occurs- See Also:
setVerbose(int)
-
setPreviewType
public void setPreviewType(int value) throws MagickExceptionSet the preview_type attribute.- Parameters:
value- new value of the preview_type attribute- Throws:
MagickException- if an error occurs
-
getPreviewType
public int getPreviewType() throws MagickExceptionGet the preview_type attribute.- Returns:
- the preview_type attribute value
- Throws:
MagickException- if an error occurs
-
setPing
public void setPing(boolean value) throws MagickExceptionSet the ping attribute. Used to get information about an image without having to read the image into memory. Afterwards you can use readImage to get the width, height, file size in bytes, and the file format of the image, without loading the pixels.- Parameters:
value- new value of the ping attribute- Throws:
MagickException- if an error occurs
-
getPing
public boolean getPing() throws MagickExceptionGet the ping attribute.- Returns:
- the ping attribute value
- Throws:
MagickException- if an error occurs- See Also:
setPing(boolean)
-
setMagick
public void setMagick(java.lang.String magick) throws MagickExceptionSet the magick attribute of the handle.- Parameters:
magick- new value of the magick attribute- Throws:
MagickException- if an error occurs
-
getMagick
public java.lang.String getMagick() throws MagickExceptionReturn the magick attribute of the handle.- Returns:
- the magick attribute value
- Throws:
MagickException- if an error occurs
-
setUnits
public void setUnits(int resolutionType) throws MagickExceptionSet the units attribute of the ImageInfo.- Parameters:
resolutionType- the resolution type as defined in ResolutionType- Throws:
MagickException- if an error occurs- See Also:
ResolutionType
-
getUnits
public int getUnits() throws MagickExceptionGet the units attribute of the ImageInfo.- Returns:
- A integer representing the resolution type as defined in ResolutionType
- Throws:
MagickException- on errorMagickException- if an error occurs- See Also:
ResolutionType
-
setBorderColor
public void setBorderColor(PixelPacket color) throws MagickException
Set the border colour..- Parameters:
color- the border colour- Throws:
MagickException- if an error occurs- See Also:
MagickImage.borderImage(java.awt.Rectangle)
-
getBorderColor
public PixelPacket getBorderColor() throws MagickException
Get the current border colour..- Returns:
- the current border colour
- Throws:
MagickException- if an error occurs- See Also:
MagickImage.borderImage(java.awt.Rectangle)
-
getDepth
public int getDepth() throws MagickExceptionReturn the depth of the image.- Returns:
- the depth of the image.
- Throws:
MagickException- if an error occurs
-
setDepth
public void setDepth(int depth) throws MagickExceptionSet the depth of the image.- Parameters:
depth- the depth of the image- Throws:
MagickException- if an error occurs
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-