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()booleangetAffirm()Get the affirm attribute.intgetAntialias()PixelPacketgetBorderColor()Get the current border colour..intgetColorspace()intgetCompression()java.lang.StringgetDensity()intgetDepth()Return the depth of the image.intgetDither()java.lang.StringgetFileName()Return the file name attribute of the handle.java.lang.StringgetFont()intgetInterlace()java.lang.StringgetMagick()Return the magick attribute of the handle.intgetMonochrome()java.lang.StringgetPage()booleangetPing()Get the ping attribute.intgetPointSize()intgetPreviewType()Get the preview_type attribute.intgetQuality()java.lang.StringgetServerName()java.lang.StringgetSize()intgetSubimage()intgetSubrange()java.lang.StringgetTexture()java.lang.StringgetTile()intgetUnits()Get the units attribute of the ImageInfo.intgetVerbose()Get the verbose attribute.java.lang.StringgetView()voidinit()Initialises the internal native handle.voidsetAdjoin(int value)voidsetAffirm(boolean affirm)Set the affirm attribute.voidsetAntialias(int value)voidsetBorderColor(PixelPacket color)Set the border colour..voidsetColorspace(int value)voidsetCompression(int value)voidsetDensity(java.lang.String density)voidsetDepth(int depth)Set the depth of the image.voidsetDither(int value)voidsetFileName(java.lang.String fileName)Set the file name attribute of the handle.voidsetFont(java.lang.String font)voidsetImageOption(java.lang.String option, java.lang.String value)Associates a value with an image option.voidsetInterlace(int value)voidsetMagick(java.lang.String magick)Set the magick attribute of the handle.voidsetMonochrome(int value)voidsetPage(java.lang.String page)voidsetPing(boolean value)Set the ping attribute.voidsetPointSize(int value)voidsetPreviewType(int value)Set the preview_type attribute.voidsetQuality(int value)voidsetServerName(java.lang.String name)voidsetSize(java.lang.String size)voidsetSubimage(int value)voidsetSubrange(int value)voidsetTexture(java.lang.String texture)voidsetTile(java.lang.String tile)voidsetUnits(int resolutionType)Set the units attribute of the ImageInfo.voidsetVerbose(int value)Set the verbose attribute.voidsetView(java.lang.String view)-
Methods inherited from class magick.Magick
parseImageGeometry
-
-
-
-
Constructor Detail
-
ImageInfo
public ImageInfo() throws MagickExceptionConstructor.- Throws:
MagickException
-
ImageInfo
public ImageInfo(java.lang.String fileName) throws MagickExceptionConstructor.- Parameters:
fileName- initial value of the file_name attribute- Throws:
MagickException
-
-
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
-
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
-
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- Since:
- JMagick 6.4.3 (2008-08-05)
-
getFileName
public java.lang.String getFileName() throws MagickExceptionReturn the file name attribute of the handle.- Throws:
MagickException
-
setAffirm
public void setAffirm(boolean affirm) throws MagickExceptionSet the affirm attribute.- Parameters:
affirm- new value of affirm- Throws:
MagickException
-
getAffirm
public boolean getAffirm() throws MagickExceptionGet the affirm attribute.- Throws:
MagickException
-
setSubimage
public void setSubimage(int value) throws MagickException- Throws:
MagickException
-
getSubimage
public int getSubimage() throws MagickException- Throws:
MagickException
-
setSubrange
public void setSubrange(int value) throws MagickException- Throws:
MagickException
-
getSubrange
public int getSubrange() throws MagickException- Throws:
MagickException
-
setServerName
public void setServerName(java.lang.String name) throws MagickException- Throws:
MagickException
-
getServerName
public java.lang.String getServerName() throws MagickException- Throws:
MagickException
-
setFont
public void setFont(java.lang.String font) throws MagickException- Throws:
MagickException
-
getFont
public java.lang.String getFont() throws MagickException- Throws:
MagickException
-
setSize
public void setSize(java.lang.String size) throws MagickException- Throws:
MagickException
-
getSize
public java.lang.String getSize() throws MagickException- Throws:
MagickException
-
setTile
public void setTile(java.lang.String tile) throws MagickException- Throws:
MagickException
-
getTile
public java.lang.String getTile() throws MagickException- Throws:
MagickException
-
setDensity
public void setDensity(java.lang.String density) throws MagickException- Throws:
MagickException
-
getDensity
public java.lang.String getDensity() throws MagickException- Throws:
MagickException
-
setPage
public void setPage(java.lang.String page) throws MagickException- Throws:
MagickException
-
getPage
public java.lang.String getPage() throws MagickException- Throws:
MagickException
-
setTexture
public void setTexture(java.lang.String texture) throws MagickException- Throws:
MagickException
-
getTexture
public java.lang.String getTexture() throws MagickException- Throws:
MagickException
-
setView
public void setView(java.lang.String view) throws MagickException- Throws:
MagickException
-
getView
public java.lang.String getView() throws MagickException- Throws:
MagickException
-
setAdjoin
public void setAdjoin(int value) throws MagickException- Throws:
MagickException
-
getAdjoin
public int getAdjoin() throws MagickException- Throws:
MagickException
-
setColorspace
public void setColorspace(int value) throws MagickException- Throws:
MagickException
-
getColorspace
public int getColorspace() throws MagickException- Throws:
MagickException
-
setCompression
public void setCompression(int value) throws MagickException- Throws:
MagickException
-
getCompression
public int getCompression() throws MagickException- Throws:
MagickException
-
setDither
public void setDither(int value) throws MagickException- Throws:
MagickException
-
getDither
public int getDither() throws MagickException- Throws:
MagickException
-
setAntialias
public void setAntialias(int value) throws MagickException- Throws:
MagickException
-
getAntialias
public int getAntialias() throws MagickException- Throws:
MagickException
-
setInterlace
public void setInterlace(int value) throws MagickException- Throws:
MagickException
-
getInterlace
public int getInterlace() throws MagickException- Throws:
MagickException
-
setMonochrome
public void setMonochrome(int value) throws MagickException- Throws:
MagickException
-
getMonochrome
public int getMonochrome() throws MagickException- Throws:
MagickException
-
setPointSize
public void setPointSize(int value) throws MagickException- Throws:
MagickException
-
getPointSize
public int getPointSize() throws MagickException- Throws:
MagickException
-
setQuality
public void setQuality(int value) throws MagickException- Throws:
MagickException
-
getQuality
public int getQuality() throws MagickException- Throws:
MagickException
-
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.
- Throws:
MagickException- See Also:
MagickImage.writeImage(ImageInfo)
-
getVerbose
public int getVerbose() throws MagickExceptionGet the verbose attribute. @see #setVerbose(int)- Throws:
MagickException
-
setPreviewType
public void setPreviewType(int value) throws MagickExceptionSet the preview_type attribute.- Parameters:
value- new value of the preview_type attribute- Throws:
MagickException
-
getPreviewType
public int getPreviewType() throws MagickExceptionGet the preview_type attribute.- Throws:
MagickException
-
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
-
getPing
public boolean getPing() throws MagickExceptionGet the ping attribute. @see #setPing(boolean)- Throws:
MagickException
-
setMagick
public void setMagick(java.lang.String magick) throws MagickExceptionSet the magick attribute of the handle. author: Abdulbaset Gaddah- Throws:
MagickException
-
getMagick
public java.lang.String getMagick() throws MagickExceptionReturn the magick attribute of the handle.- Throws:
MagickException
-
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- on error- 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 error- See Also:
ResolutionType
-
setBorderColor
public void setBorderColor(PixelPacket color) throws MagickException
Set the border colour..- Parameters:
color- the border colour- Throws:
MagickException- on error- 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- on error- 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- on error
-
setDepth
public void setDepth(int depth) throws MagickExceptionSet the depth of the image.- Parameters:
depth- the depth of the image- Throws:
MagickException- on error
-
-