com.arctorus.documents
Class Picture

java.lang.Object
  extended by com.arctorus.documents.Shape
      extended by com.arctorus.documents.Picture

public final class Picture
extends Shape

Picture on a document page.


Method Summary
 float getBrightness()
          Return image brightness.
 float getContrast()
          Return image contrast.
 CropFormat getCropFormat()
          Get image cropping properties.
 byte[] getData()
          Get copy of image data as byte array.
 java.lang.String getFormatName()
          Get image format or file extension e.g.
 void setBrightness(float brightness)
          Set image brightness.
 void setContrast(float contrast)
          Set image contrast.
 void setCropFormat(CropFormat cropFormat)
          Set image cropping properties.
 void setData(java.io.InputStream inputStream)
          Set image data from input stream.
 
Methods inherited from class com.arctorus.documents.Shape
createCustomShape, createEllipse, createLine, createPicture, createRectangle, getAdjustmentList, getBounds, getFillFormat, getHyperlink, getLowerRightPoint, getRotation, getShapeType, getStrokeFormat, getTextBox, getUpperLeftPoint, hasHyperlink, isProtected, isReflectVertically, setBounds, setFillFormat, setHyperlink, setProtected, setReflectVertically, setRotation, setStrokeFormat
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setData

public void setData(java.io.InputStream inputStream)
             throws java.io.IOException,
                    DocumentException
Set image data from input stream.

Parameters:
inputStream - input stream to read image from.
Throws:
DocumentException - in case image doesn't contain data or has unsupported image type.
java.io.IOException

getData

public byte[] getData()
Get copy of image data as byte array.

Returns:
image data.

getFormatName

public java.lang.String getFormatName()
Get image format or file extension e.g. "jpg", "bmp", etc.


getCropFormat

public CropFormat getCropFormat()
Get image cropping properties.


setCropFormat

public void setCropFormat(CropFormat cropFormat)
Set image cropping properties.

Parameters:
cropFormat - new image cropping properties.

getBrightness

public float getBrightness()
Return image brightness. Value is in the range [-1..1].


setBrightness

public void setBrightness(float brightness)
Set image brightness.

Parameters:
brightness - new image brightness. Must be in the range [-1..1].

getContrast

public float getContrast()
Return image contrast. Value is in the range [-1..1].


setContrast

public void setContrast(float contrast)
Set image contrast.

Parameters:
contrast - new image contrast. Must be in the range [-1..1].