Package magick

Class ImageInfo


public class ImageInfo extends Magick
Corresponds to the ImageMagick ImageInfo structure.
Author:
Eric Yeo
  • Constructor Details

  • Method Details

    • finalize

      protected void finalize()
      To release memory on cleanup.
      Overrides:
      finalize in class Object
    • init

      public void init() throws MagickException
      Initialises the internal native handle.
      Throws:
      MagickException - if an error occurs
    • setFileName

      public void setFileName(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(String option, 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 option
      value - the image option value
      Throws:
      MagickException - if an error occurs
      Since:
      JMagick 6.4.3 (2008-08-05)
    • getFileName

      public 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(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 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(String font) throws MagickException
      Set the font attribute.
      Parameters:
      font - the new value of font
      Throws:
      MagickException - if an error occurs
    • getFont

      public String getFont() throws MagickException
      Get the font attribute.
      Returns:
      the font attribute value
      Throws:
      MagickException - if an error occurs
    • setSize

      public void setSize(String size) throws MagickException
      Set the size attribute.
      Parameters:
      size - the new value of size
      Throws:
      MagickException - if an error occurs
    • getSize

      public String getSize() throws MagickException
      Get the size attribute.
      Returns:
      the size attribute value
      Throws:
      MagickException - if an error occurs
    • setTile

      public void setTile(String tile) throws MagickException
      Set the tile attribute.
      Parameters:
      tile - the new value of tile
      Throws:
      MagickException - if an error occurs
    • getTile

      public String getTile() throws MagickException
      Get the tile attribute.
      Returns:
      the tile attribute value
      Throws:
      MagickException - if an error occurs
    • setDensity

      public void setDensity(String density) throws MagickException
      Set the density attribute.
      Parameters:
      density - the new value of density
      Throws:
      MagickException - if an error occurs
    • getDensity

      public String getDensity() throws MagickException
      Get the density attribute.
      Returns:
      the density attribute value
      Throws:
      MagickException - if an error occurs
    • setPage

      public void setPage(String page) throws MagickException
      Set the page attribute.
      Parameters:
      page - the new value of page
      Throws:
      MagickException - if an error occurs
    • getPage

      public String getPage() throws MagickException
      Get the page attribute.
      Returns:
      the page attribute value
      Throws:
      MagickException - if an error occurs
    • setTexture

      public void setTexture(String texture) throws MagickException
      Set the texture attribute.
      Parameters:
      texture - the new value of texture
      Throws:
      MagickException - if an error occurs
    • getTexture

      public String getTexture() throws MagickException
      Get the texture attribute.
      Returns:
      the texture attribute value
      Throws:
      MagickException - if an error occurs
    • setView

      public void setView(String view) throws MagickException
      Set the view attribute.
      Parameters:
      view - the new value of view
      Throws:
      MagickException - if an error occurs
    • getView

      public 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:
    • getVerbose

      public int getVerbose() throws MagickException
      Get the verbose attribute.
      Returns:
      verbosity
      Throws:
      MagickException - if an error occurs
      See Also:
    • 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:
    • setMagick

      public void setMagick(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 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:
    • 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 error
      MagickException - if an error occurs
      See Also:
    • 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:
    • getBorderColor

      public PixelPacket getBorderColor() throws MagickException
      Get the current border colour..
      Returns:
      the current border colour
      Throws:
      MagickException - if an error occurs
      See Also:
    • 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 String toString()
      Overrides:
      toString in class Object