DocumentImage Class¶
Namespace: id3.Document
Definition¶
class DocumentImage
class DocumentImage implements Finalizable
public partial class DocumentImage
public class DocumentImage implements AutoCloseable, Serializable
public class DocumentImage
typedef struct id3DocumentImage *ID3_DOCUMENT_IMAGE;
Usage¶
documentImageInstance = id3document.DocumentImage()
Explicit destruction
# ...
del documentImageInstance
final documentImageInstance = sdk.DocumentImage();
// ...
Explicit destruction
// ...
documentImageInstance.dispose()
using (var documentImageInstance = new DocumentImage())
{
// ...
}
Explicit destruction
var documentImageInstance = new DocumentImage()
// ...
documentImageInstance.Dispose()
try (DocumentImage documentImageInstance = new DocumentImage()) {
// ...
}
Explicit destruction
DocumentImage documentImageInstance = new DocumentImage();
// ...
documentImageInstance.close();
private var documentImageInstance: DocumentImage? = nil
documentImageInstance = try DocumentImage()
ID3_DOCUMENT_IMAGE hDocumentImage{};
int err = id3DocumentImage_Initialize(&hDocumentImage);
if (err == ID3_SUCCESS) {
// ...
id3DocumentImage_Dispose(&hDocumentImage);
}
Properties¶
Name |
Type |
Description |
---|---|---|
byte[] |
Raw data buffer of the image. |
|
int |
Height in pixels. |
|
int |
Pixel depth. |
|
Pixel format. |
||
int |
Stride in bytes. |
|
int |
Width in pixels. |
Static Methods¶
Name |
Description |
---|---|
Creates an Image from the specified data buffer. |
|
Creates an Image from the specified file. |
|
Creates an Image from the specified data buffer. Supported pixel formats are grayscale formats, BGR and RGB 24bits, and BGRA. For integers format, input datatype must be UINT8. |
|
Creates an Image from the specified raw data buffer. |
|
Creates an Image from the specified YUV planes. |
|
Sets the Image object fields. |
Methods¶
Name |
Description |
---|---|
Clones the DocumentImage object. |
|
Computes the difference with another image. |
|
Applies a gamma correction to the image. |
|
Crop a rectangular region of interest in the image according to the given bounds. |
|
Downscales the image in-place so that its maximum dimension is equal to the given maximum size, while preserving the aspect ratio. |
|
Downscales the image so that its maximum dimension equals the given maximum size, while preserving the aspect ratio. |
|
Extracts a region of interest in the image according to the given bounds. |
|
Extracts a region of interest in the image according to the given bounds. |
|
Flips the image in-place. |
|
Flips the image. |
|
Gets a pointer to the image pixels. |
|
Add padding around the image |
|
Reallocates the internal memory of the Image from parameters. |
|
Resizes the image in-place to the required width and height. |
|
Resizes the image to the specified width and height. |
|
Rotates the image in-place to the specified angle. |
|
Rotates the image to the specified angle. |
|
Exports the image to a buffer. |
|
Copies the image to a buffer in the specified format. |
|
Saves the image to the specified file. |
|
Exports the image to a numpy array (Python only) |
|
Copies image pixels in the specified format into a buffer. |
|
Transposes the image object. |