---
Product: Aspose.Cells
Platform: java
Page Type: reference
Canonical URL: https://reference.aspose.org/cells/java/PictureCollection
---

# PictureCollection

## Overview

`PictureCollection` is a class in Aspose.Cells FOSS for Java.

Collection of embedded pictures on a worksheet.

This class provides 7 methods for working with `PictureCollection` objects in Java.
Available methods include: `add`, `contentTypeFromExtension`, `detectImageType`, `extensionFromData`, `get`, `getCount`, `removeAt`.
All public members are accessible to any Java application after installing the Aspose.Cells FOSS for Java package.
Properties: `count`.

## Description

`PictureCollection` is a class in the Aspose.Cells FOSS library for Java that exposes 9 methods and 1 property for programmatic use.

Core capabilities include: Removes the picture at the specified index. These operations enable developers to integrate picturecollection functionality directly into Java applications.

The class also provides the `count` property (gets the count).

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `count` | `int` | Read | Gets the count. |

## Methods

| Signature | Description |
|-----------|-------------|
| `getCount()` → `int` | Returns the count. |
| `get(index: int)` → `Picture` | Returns the picture at the given index. |
| `add(upperLeftRow: int, upperLeftColumn: int, lowerRightRow: int, lowerRightColumn: int, imageData: byte[])` → `int` | Adds a picture from raw bytes. |
| `add(upperLeftRow: int, upperLeftColumn: int, lowerRightRow: int, lowerRightColumn: int, stream: InputStream)` → `int` | Adds a picture from an InputStream. |
| `add(upperLeftRow: int, upperLeftColumn: int, lowerRightRow: int, lowerRightColumn: int, fileName: String)` → `int` | Adds a picture from a file path. |
| `removeAt(index: int)` | Removes the picture at the specified index. |
| `detectImageType(data: byte[])` → `ImageType` | Detects and returns the image type from raw byte data. |
| `extensionFromData(data: byte[])` → `String` | Returns the file extension inferred from the raw image byte data. |
| `contentTypeFromExtension(ext: String)` → `String` | Returns the MIME content type corresponding to the given file extension. |

## See Also

- [Aspose.Cells — Enterprise API Reference](https://reference.aspose.com/cells/)
- [Aspose.Cells for Java — Enterprise API Reference](https://reference.aspose.com/cells/java/com.aspose.cells/picturecollection/)