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 void
finalize()
To release memory on cleanup.int
getAdjoin()
Get the adjoin attribute.boolean
getAffirm()
Get the affirm attribute.int
getAntialias()
Get the antialias attribute.PixelPacket
getBorderColor()
Get the current border colour..int
getColorspace()
Get the colorspace attribute.int
getCompression()
Get the compression attribute.java.lang.String
getDensity()
Get the density attribute.int
getDepth()
Return the depth of the image.int
getDither()
Get the dither attribute.java.lang.String
getFileName()
Return the file name attribute of the handle.java.lang.String
getFont()
Get the font attribute.double
getFuzz()
Get the fuzz attribute.int
getInterlace()
Get the interlace attribute.java.lang.String
getMagick()
Return the magick attribute of the handle.int
getMonochrome()
Get the monochrone attribute.java.lang.String
getPage()
Get the page attribute.boolean
getPing()
Get the ping attribute.int
getPointSize()
Get the pointsize attribute.int
getPreviewType()
Get the preview_type attribute.int
getQuality()
Get the quality attribute.java.lang.String
getServerName()
Get the server_name attribute.java.lang.String
getSize()
Get the size attribute.int
getSubimage()
Get the subimage attribute.int
getSubrange()
Get the subrange attribute.java.lang.String
getTexture()
Get the texture attribute.java.lang.String
getTile()
Get the tile attribute.int
getUnits()
Get the units attribute of the ImageInfo.int
getVerbose()
Get the verbose attribute.java.lang.String
getView()
Get the view attribute.void
init()
Initialises the internal native handle.void
setAdjoin(int value)
Set the adjoin attribute.void
setAffirm(boolean affirm)
Set the affirm attribute.void
setAntialias(int value)
Set the antialias attribute.void
setBorderColor(PixelPacket color)
Set the border colour..void
setColorspace(int value)
Set the colorspace attribute.void
setCompression(int value)
Set the compression attribute.void
setDensity(java.lang.String density)
Set the density attribute.void
setDepth(int depth)
Set the depth of the image.void
setDither(int value)
Set the dither attribute.void
setFileName(java.lang.String fileName)
Set the file name attribute of the handle.void
setFont(java.lang.String font)
Set the font attribute.void
setFuzz(double value)
Set the fuzz attribute.void
setImageOption(java.lang.String option, java.lang.String value)
Associates a value with an image option.void
setInterlace(int value)
Set the interlace attribute.void
setMagick(java.lang.String magick)
Set the magick attribute of the handle.void
setMonochrome(int value)
Set the monochrome attribute.void
setPage(java.lang.String page)
Set the page attribute.void
setPing(boolean value)
Set the ping attribute.void
setPointSize(int value)
Set the pointsize attribute.void
setPreviewType(int value)
Set the preview_type attribute.void
setQuality(int value)
Set the quality attribute.void
setServerName(java.lang.String name)
Set the server_name attribute.void
setSize(java.lang.String size)
Set the size attribute.void
setSubimage(int value)
Set the subimage attribute.void
setSubrange(int value)
Set the subrange attribute.void
setTexture(java.lang.String texture)
Set the texture attribute.void
setTile(java.lang.String tile)
Set the tile attribute.void
setUnits(int resolutionType)
Set the units attribute of the ImageInfo.void
setVerbose(int value)
Set the verbose attribute.void
setView(java.lang.String view)
Set the view attribute.java.lang.String
toString()
-
Methods inherited from class magick.Magick
parseImageGeometry, queryFonts
-
-
-
-
Constructor Detail
-
ImageInfo
public ImageInfo() throws MagickException
Constructor.- Throws:
MagickException
- if an error occurs
-
ImageInfo
public ImageInfo(java.lang.String fileName) throws MagickException
Constructor.- 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:
finalize
in classjava.lang.Object
-
init
public void init() throws MagickException
Initialises the internal native handle.- Throws:
MagickException
- if an error occurs
-
setFileName
public void setFileName(java.lang.String fileName) throws MagickException
Set 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 MagickException
Associates 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 MagickException
Return 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 MagickException
Set the affirm attribute.- Parameters:
affirm
- new value of affirm- Throws:
MagickException
- if an error occurs
-
getAffirm
public boolean getAffirm() throws MagickException
Get the affirm attribute.- Returns:
- the affirm attribute value
- Throws:
MagickException
- if an error occurs
-
setSubimage
public void setSubimage(int value) throws MagickException
Set the subimage attribute.- Parameters:
value
- new value of subimage- Throws:
MagickException
- if an error occurs
-
getSubimage
public int getSubimage() throws MagickException
Get the subimage attribute.- Returns:
- the subimage attribute value
- Throws:
MagickException
- if an error occurs
-
setSubrange
public void setSubrange(int value) throws MagickException
Set the subrange attribute.- Parameters:
value
- the new value of subrange- Throws:
MagickException
- if an error occurs
-
getSubrange
public int getSubrange() throws MagickException
Get the subrange attribute.- Returns:
- the subrange attribute value
- Throws:
MagickException
- if an error occurs
-
setServerName
public void setServerName(java.lang.String name) throws MagickException
Set 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 MagickException
Get 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 MagickException
Set the font attribute.- Parameters:
font
- the new value of font- Throws:
MagickException
- if an error occurs
-
getFont
public java.lang.String getFont() throws MagickException
Get the font attribute.- Returns:
- the font attribute value
- Throws:
MagickException
- if an error occurs
-
setSize
public void setSize(java.lang.String size) throws MagickException
Set the size attribute.- Parameters:
size
- the new value of size- Throws:
MagickException
- if an error occurs
-
getSize
public java.lang.String getSize() throws MagickException
Get the size attribute.- Returns:
- the size attribute value
- Throws:
MagickException
- if an error occurs
-
setTile
public void setTile(java.lang.String tile) throws MagickException
Set the tile attribute.- Parameters:
tile
- the new value of tile- Throws:
MagickException
- if an error occurs
-
getTile
public java.lang.String getTile() throws MagickException
Get the tile attribute.- Returns:
- the tile attribute value
- Throws:
MagickException
- if an error occurs
-
setDensity
public void setDensity(java.lang.String density) throws MagickException
Set the density attribute.- Parameters:
density
- the new value of density- Throws:
MagickException
- if an error occurs
-
getDensity
public java.lang.String getDensity() throws MagickException
Get the density attribute.- Returns:
- the density attribute value
- Throws:
MagickException
- if an error occurs
-
setPage
public void setPage(java.lang.String page) throws MagickException
Set the page attribute.- Parameters:
page
- the new value of page- Throws:
MagickException
- if an error occurs
-
getPage
public java.lang.String getPage() throws MagickException
Get the page attribute.- Returns:
- the page attribute value
- Throws:
MagickException
- if an error occurs
-
setTexture
public void setTexture(java.lang.String texture) throws MagickException
Set the texture attribute.- Parameters:
texture
- the new value of texture- Throws:
MagickException
- if an error occurs
-
getTexture
public java.lang.String getTexture() throws MagickException
Get the texture attribute.- Returns:
- the texture attribute value
- Throws:
MagickException
- if an error occurs
-
setView
public void setView(java.lang.String view) throws MagickException
Set the view attribute.- Parameters:
view
- the new value of view- Throws:
MagickException
- if an error occurs
-
getView
public java.lang.String getView() throws MagickException
Get the view attribute.- Returns:
- the view attribute value
- Throws:
MagickException
- if an error occurs
-
setAdjoin
public void setAdjoin(int value) throws MagickException
Set the adjoin attribute.- Parameters:
value
- the new value of adjoin- Throws:
MagickException
- if an error occurs
-
getAdjoin
public int getAdjoin() throws MagickException
Get the adjoin attribute.- Returns:
- the adjoin attribute value
- Throws:
MagickException
- if an error occurs
-
setColorspace
public void setColorspace(int value) throws MagickException
Set the colorspace attribute.- Parameters:
value
- the new value of colorspace- Throws:
MagickException
- if an error occurs
-
getColorspace
public int getColorspace() throws MagickException
Get the colorspace attribute.- Returns:
- the colorspace attribute value
- Throws:
MagickException
- if an error occurs
-
setCompression
public void setCompression(int value) throws MagickException
Set the compression attribute.- Parameters:
value
- the new value of compression- Throws:
MagickException
- if an error occurs
-
getCompression
public int getCompression() throws MagickException
Get the compression attribute.- Returns:
- the compression attribute value
- Throws:
MagickException
- if an error occurs
-
setDither
public void setDither(int value) throws MagickException
Set the dither attribute.- Parameters:
value
- the new value of dither- Throws:
MagickException
- if an error occurs
-
getDither
public int getDither() throws MagickException
Get the dither attribute.- Returns:
- the dither attribute value
- Throws:
MagickException
- if an error occurs
-
setAntialias
public void setAntialias(int value) throws MagickException
Set the antialias attribute.- Parameters:
value
- the new value of antialias- Throws:
MagickException
- if an error occurs
-
getAntialias
public int getAntialias() throws MagickException
Get the antialias attribute.- Returns:
- the antialias attribute value
- Throws:
MagickException
- if an error occurs
-
setInterlace
public void setInterlace(int value) throws MagickException
Set the interlace attribute.- Parameters:
value
- the new value of interlace- Throws:
MagickException
- if an error occurs
-
getInterlace
public int getInterlace() throws MagickException
Get the interlace attribute.- Returns:
- the interlace attribute value
- Throws:
MagickException
- if an error occurs
-
setMonochrome
public void setMonochrome(int value) throws MagickException
Set the monochrome attribute.- Parameters:
value
- the new value of monochrome- Throws:
MagickException
- if an error occurs
-
getMonochrome
public int getMonochrome() throws MagickException
Get the monochrone attribute.- Returns:
- the monochrone attribute value
- Throws:
MagickException
- if an error occurs
-
setFuzz
public void setFuzz(double value) throws MagickException
Set the fuzz attribute.- Parameters:
value
- the new value of fuzz- Throws:
MagickException
- if an error occurs
-
getFuzz
public double getFuzz() throws MagickException
Get the fuzz attribute.- Returns:
- the fuzz attribute value
- Throws:
MagickException
- if an error occurs
-
setPointSize
public void setPointSize(int value) throws MagickException
Set the pointsize attribute.- Parameters:
value
- the new value of pointsize- Throws:
MagickException
- if an error occurs
-
getPointSize
public int getPointSize() throws MagickException
Get the pointsize attribute.- Returns:
- the pointsize attribute value
- Throws:
MagickException
- if an error occurs
-
setQuality
public void setQuality(int value) throws MagickException
Set the quality attribute.- Parameters:
value
- the new value of quality- Throws:
MagickException
- if an error occurs
-
getQuality
public int getQuality() throws MagickException
Get the quality attribute.- Returns:
- the quality attribute value
- Throws:
MagickException
- if an error occurs
-
setVerbose
public void setVerbose(int value) throws MagickException
Set 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 MagickException
Get the verbose attribute.- Returns:
- verbosity
- Throws:
MagickException
- if an error occurs- See Also:
setVerbose(int)
-
setPreviewType
public void setPreviewType(int value) throws MagickException
Set the preview_type attribute.- Parameters:
value
- new value of the preview_type attribute- Throws:
MagickException
- if an error occurs
-
getPreviewType
public int getPreviewType() throws MagickException
Get the preview_type attribute.- Returns:
- the preview_type attribute value
- Throws:
MagickException
- if an error occurs
-
setPing
public void setPing(boolean value) throws MagickException
Set 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 MagickException
Get 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 MagickException
Set 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 MagickException
Return the magick attribute of the handle.- Returns:
- the magick attribute value
- Throws:
MagickException
- if an error occurs
-
setUnits
public void setUnits(int resolutionType) throws MagickException
Set 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 MagickException
Get 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 MagickException
Return the depth of the image.- Returns:
- the depth of the image.
- Throws:
MagickException
- if an error occurs
-
setDepth
public void setDepth(int depth) throws MagickException
Set 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:
toString
in classjava.lang.Object
-
-