ImageCollection

Inheritance: java.lang.Object, com.aspose.slides.DomObject

All Implemented Interfaces: com.aspose.slides.IImageCollection

public final class ImageCollection extends DomObject<Presentation> implements IImageCollection

Represents collection of PPImage.

Methods

MethodDescription
size()Returns a number of images in the collection.
get_Item(int index)Gets the element at the specified index.
addImage(IPPImage imageSource)Adds a copy of an image from an another presentation.
addImage(BufferedImage image)Add an image to a presentation.
addImage(IImage image)Add an image to a presentation.
addImage(InputStream stream)Add an image to a presentation from stream.
addImage(InputStream stream, int loadingStreamBehavior)Creates and adds an image to a presentation from stream.
addImage(byte[] buffer)Adds an image to a presentation from specified buffer.
addImage(ISvgImage svgImage)Add an image to a presentation from Svg object.
iterator()Returns an enumerator that iterates through the collection.
iteratorJava()Returns a java iterator for the entire collection.
copyTo(System.Array array, int index)Copies all elements from the collection to the specified array.
isSynchronized()Returns a value indicating whether access to the collection is synchronized (thread-safe).
getSyncRoot()Returns a synchronization root.

size()

public final int size()

Returns a number of images in the collection. Read-only int .

Returns: int

get_Item(int index)

public final IPPImage get_Item(int index)

Gets the element at the specified index. Read-only IPPImage.

Parameters:

ParameterTypeDescription
indexint

Returns: IPPImage

addImage(IPPImage imageSource)

public final IPPImage addImage(IPPImage imageSource)

Adds a copy of an image from an another presentation.

Parameters:

ParameterTypeDescription
imageSourceIPPImageSource image.

Returns: IPPImage - Added image.

addImage(BufferedImage image)

public final IPPImage addImage(BufferedImage image)

Add an image to a presentation.

Parameters:

ParameterTypeDescription
imagejava.awt.image.BufferedImageImage to add.

This method converts WMF/EMF metafiles to raster PNG image before inserting to a presentation. |

Returns: IPPImage - Added image.

addImage(IImage image)

public final IPPImage addImage(IImage image)

Add an image to a presentation.

Parameters:

ParameterTypeDescription
imageIImageImage to add.

This method converts WMF/EMF metafiles to raster PNG image before inserting to a presentation. |

Returns: IPPImage - Added image.

addImage(InputStream stream)

public final IPPImage addImage(InputStream stream)

Add an image to a presentation from stream.

Parameters:

ParameterTypeDescription
streamjava.io.InputStreamStream to add image from.

This method can add WMF/EMF metafiles to a presentation without converting them to raster PNG image. |

Returns: IPPImage - Added image.

addImage(InputStream stream, int loadingStreamBehavior)

public final IPPImage addImage(InputStream stream, int loadingStreamBehavior)

Creates and adds an image to a presentation from stream.

Parameters:

ParameterTypeDescription
streamjava.io.InputStreamStream to add image file from.
loadingStreamBehaviorintThe behavior which will be applied to the stream.

Returns: IPPImage - Added IPPImage.

addImage(byte[] buffer)

public final IPPImage addImage(byte[] buffer)

Adds an image to a presentation from specified buffer.

Parameters:

ParameterTypeDescription
bufferbyte[]Buffer.

Returns: IPPImage - Added image.

addImage(ISvgImage svgImage)

public final IPPImage addImage(ISvgImage svgImage)

Add an image to a presentation from Svg object.

Parameters:

ParameterTypeDescription
svgImageISvgImageSvg image object ISvgImage

Returns: IPPImage - Added image.

iterator()

public final System.Collections.Generic.IGenericEnumerator<IPPImage> iterator()

Returns an enumerator that iterates through the collection.

Returns: com.aspose.ms.System.Collections.Generic.IGenericEnumerator<com.aspose.slides.IPPImage> - A IGenericEnumerator that can be used to iterate through the collection.

iteratorJava()

public final System.Collections.Generic.IGenericEnumerator<IPPImage> iteratorJava()

Returns a java iterator for the entire collection.

Returns: com.aspose.ms.System.Collections.Generic.IGenericEnumerator<com.aspose.slides.IPPImage> - An java.util.Iterator for the entire collection.

copyTo(System.Array array, int index)

public final void copyTo(System.Array array, int index)

Copies all elements from the collection to the specified array.

Parameters:

ParameterTypeDescription
arraycom.aspose.ms.System.ArrayTarget array.
indexintStarting index in the target array.

isSynchronized()

public final boolean isSynchronized()

Returns a value indicating whether access to the collection is synchronized (thread-safe). Read-only boolean .

Returns: boolean

getSyncRoot()

public final Object getSyncRoot()

Returns a synchronization root. Read-only Object .

Returns: java.lang.Object