com.aspose.slides
Class PPImage

java.lang.Object
  extended by com.aspose.slides.PPImage
Direct Known Subclasses:
Picture, PictureBullet

public abstract class PPImage
extends java.lang.Object

Represents an abstract image used in a presentation.


Constructor Summary
PPImage(Presentation parent, java.io.InputStream stream)
          This constructor gets a source stream from which the contents of the Picture is read.
PPImage(Presentation parent, PPImage src)
          This constructor gets another picture as a source.
 
Method Summary
 float getHeight()
          Returns the height of an image.
 byte[] getImage()
          Returns an image as byte array.
 int getImageFormat()
          Returns the format of a picture.
 Presentation getParent()
          Returns the parent presentation for a picture.
 java.awt.image.RenderedImage getRenderedImage()
          Creates and returns RenderedImage object for the current image.
 java.awt.image.RenderedImage getRenderedImage(int w, int h)
          Creates and returns RenderedImage object with specified size for the current image.
 java.awt.Color getTransparentColor()
          Returns the transparent color of an image.
 float getWidth()
          Returns the width of an image.
 void setTransparentColor(java.awt.Color value)
          Sets the transparent color of an image.
 void write(java.io.OutputStream stream)
          Writes picture to a stream.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PPImage

public PPImage(Presentation parent,
               java.io.InputStream stream)
        throws PptImageException
This constructor gets a source stream from which the contents of the Picture is read.

Parameters:
parent - the parent presentation.
stream - the input stream.
Throws:
PptImageException

PPImage

public PPImage(Presentation parent,
               PPImage src)
        throws PptImageException
This constructor gets another picture as a source.

Parameters:
parent - the parent presentation.
src - source picture
Throws:
PptImageException
Method Detail

write

public void write(java.io.OutputStream stream)
           throws PptImageException
Writes picture to a stream.

Parameters:
stream - the output stream.
Throws:
PptImageException

getImage

public byte[] getImage()
Returns an image as byte array.


getRenderedImage

public java.awt.image.RenderedImage getRenderedImage(int w,
                                                     int h)
Creates and returns RenderedImage object with specified size for the current image.

Parameters:
w - width of the created image.
h - height of the created image.

getRenderedImage

public java.awt.image.RenderedImage getRenderedImage()
Creates and returns RenderedImage object for the current image.


getParent

public Presentation getParent()
Returns the parent presentation for a picture.

Returns:
The parent presentation.

getImageFormat

public int getImageFormat()
Returns the format of a picture.

Returns:
The picture format. See ImageFormat.

getWidth

public float getWidth()
Returns the width of an image.


getHeight

public float getHeight()
Returns the height of an image.


getTransparentColor

public java.awt.Color getTransparentColor()
Returns the transparent color of an image.


setTransparentColor

public void setTransparentColor(java.awt.Color value)
Sets the transparent color of an image.

Parameters:
value - new transparent color.