com.aspose.slides
Class ImageCollection

java.lang.Object
  extended by com.aspose.slides.ImageCollection
All Implemented Interfaces:
com.aspose.ms.System.Collections.Generic.IGenericEnumerable<IPPImage>, com.aspose.ms.System.Collections.ICollection<IPPImage>, com.aspose.ms.System.Collections.IEnumerable<IPPImage>, IImageCollection, java.lang.Iterable<IPPImage>

public final class ImageCollection
extends java.lang.Object
implements IImageCollection

Represents collection of PPImage.


Method Summary
 IPPImage addImage(java.awt.image.BufferedImage image)
           Add an image to a presentation.
 IPPImage addImage(byte[] buffer)
           
 IPPImage addImage(java.io.InputStream stream)
           
 IPPImage addImage(IPPImage imageSource)
           Adds a copy of an image from an another presentation.
 void copyTo(com.aspose.ms.System.Array array, int index)
           Copies all elements from the collection to the specified array.
 IPPImage get_Item(int index)
           Gets the element at the specified index.
 java.lang.Object getSyncRoot()
           Returns a synchronization root.
 boolean isSynchronized()
           Returns a value indicating whether access to the collection is synchronized (thread-safe).
 com.aspose.ms.System.Collections.Generic.IGenericEnumerator<IPPImage> iterator()
           Returns an enumerator that iterates through the collection.
 int size()
           Returns a number of images in the collection.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

size

public int size()

Returns a number of images in the collection.

Specified by:
size in interface com.aspose.ms.System.Collections.ICollection<IPPImage>

get_Item

public IPPImage get_Item(int index)

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

Specified by:
get_Item in interface IImageCollection

addImage

public IPPImage addImage(IPPImage imageSource)

Adds a copy of an image from an another presentation.

Specified by:
addImage in interface IImageCollection
Parameters:
imageSource - Source image.
Returns:
Added image.

addImage

public IPPImage addImage(java.awt.image.BufferedImage image)

Add an image to a presentation.

Specified by:
addImage in interface IImageCollection
Parameters:
image - Image to add.


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

Returns:
Added image.

addImage

public IPPImage addImage(java.io.InputStream stream)
Specified by:
addImage in interface IImageCollection

addImage

public IPPImage addImage(byte[] buffer)
Specified by:
addImage in interface IImageCollection

iterator

public com.aspose.ms.System.Collections.Generic.IGenericEnumerator<IPPImage> iterator()

Returns an enumerator that iterates through the collection.

Specified by:
iterator in interface com.aspose.ms.System.Collections.Generic.IGenericEnumerable<IPPImage>
Specified by:
iterator in interface com.aspose.ms.System.Collections.IEnumerable<IPPImage>
Specified by:
iterator in interface java.lang.Iterable<IPPImage>
Returns:
A T:System.Collections.Generic.IEnumerator`1 that can be used to iterate through the collection.

copyTo

public void copyTo(com.aspose.ms.System.Array array,
                   int index)

Copies all elements from the collection to the specified array.

Specified by:
copyTo in interface com.aspose.ms.System.Collections.ICollection<IPPImage>
Parameters:
array - Target array.
index - Starting index in the target array.

isSynchronized

public boolean isSynchronized()

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

Specified by:
isSynchronized in interface com.aspose.ms.System.Collections.ICollection<IPPImage>

getSyncRoot

public java.lang.Object getSyncRoot()

Returns a synchronization root. Readonly object.

Specified by:
getSyncRoot in interface com.aspose.ms.System.Collections.ICollection<IPPImage>