public final class XImageCollection extends Object implements com.aspose.ms.System.Collections.ICollection<XImage>
Class representing XImage collection.
Modifier and Type | Method and Description |
---|---|
String |
add(BufferedImage image)
Adds entity to the end of the collection, so entity can be accessed by the last index.
|
String |
add(InputStream image)
Adds entity to the end of the collection, so entity can be accessed by the last index.
|
String |
add(InputStream image,
int quality)
Adds entity to the end of the collection, so entity can be accessed by the last index.
|
String |
add(XImage image)
Adds new image to Image list.
|
String |
addWithImageFilterType(InputStream image,
int filterType)
Adds entity to the end of the collection, so entity can be accessed by the last index.
|
void |
copyTo(com.aspose.ms.System.Array array,
int index)
Copies array of images into collection.
|
void |
delete()
Deletes images from collection.
|
void |
delete(int index)
Removes index from collection by index.
|
void |
delete(String name)
Removes index from collection by name.
|
XImage |
get_Item(int index)
Gets image from collection by its index.
|
XImage |
get_Item(String name)
Gets image from collection by its name.
|
String |
getImageName(XImage image)
Returns name in images list which is key of the given image.
|
String[] |
getNames()
Gets array of image names.
|
Object |
getSyncRoot()
Returns synchronization object.
|
boolean |
hasImage(String imgName) |
boolean |
isSynchronized()
Returns true if object is synchronized.
|
com.aspose.ms.System.Collections.IEnumerator |
iterator()
Returns collection enumerator.
|
void |
replace(int index,
InputStream stream)
Replace image in collection with another image.
|
void |
replace(int index,
InputStream stream,
int quality)
Replace image in collection with another image.
|
int |
size()
Count of images in collection.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public int size()
Count of images in collection.
size
in interface com.aspose.ms.System.Collections.ICollection<XImage>
public boolean isSynchronized()
Returns true if object is synchronized.
isSynchronized
in interface com.aspose.ms.System.Collections.ICollection<XImage>
public Object getSyncRoot()
Returns synchronization object.
getSyncRoot
in interface com.aspose.ms.System.Collections.ICollection<XImage>
public String[] getNames()
Gets array of image names.
public String add(XImage image)
Adds new image to Image list. This method adds image as reference to the same PdfObject (which allows to decrease file size)
image
- XImage to be added.public String add(InputStream image)
Adds entity to the end of the collection, so entity can be accessed by the last index.
image
- Stream containing image data (in JPEG format).public String add(BufferedImage image)
Adds entity to the end of the collection, so entity can be accessed by the last index.
image
- BufferedImage containing image data.public String addWithImageFilterType(InputStream image, int filterType)
Adds entity to the end of the collection, so entity can be accessed by the last index.
image
- Stream containing image data.filterType
- The image filter type.ImageFilterType
public String add(InputStream image, int quality)
Adds entity to the end of the collection, so entity can be accessed by the last index.
image
- Stream containing image data (in JPEG format).quality
- JPEG quality.public void delete(int index)
Removes index from collection by index.
index
- Image index.public void delete(String name)
Removes index from collection by name.
name
- Name of image which must to be deleted.public void delete()
Deletes images from collection.
public com.aspose.ms.System.Collections.IEnumerator iterator()
Returns collection enumerator.
public void copyTo(com.aspose.ms.System.Array array, int index)
Copies array of images into collection.
copyTo
in interface com.aspose.ms.System.Collections.ICollection<XImage>
array
- Array to be copied.index
- Index where images will be copied into collection.public void replace(int index, InputStream stream)
Replace image in collection with another image.
index
- Index of collection item which will be replaced.stream
- Stream containing image data (in JPEG format).public void replace(int index, InputStream stream, int quality)
Replace image in collection with another image.
index
- Index of collection item which will be replaced.stream
- Stream containing image data (in JPEG format).quality
- JPEG quality.public XImage get_Item(int index)
Gets image from collection by its index.
index
- Image indexpublic XImage get_Item(String name)
Gets image from collection by its name.
name
- Image name.public boolean hasImage(String imgName)
Copyright © 2018 Aspose. All Rights Reserved.