|
Foxit PDF SDK
|
Public Member Functions | |
| def | CloneBitmap (graphics_objects) |
| def | CloneBitmap (page, graphics_objects) |
| Clone the bitmap from current image graphics object. More... | |
| def | GetColorSpace () |
| Get color space. More... | |
| def | GetMask () |
| Get the PDF object that represents the mask of current image graphics object. More... | |
| def | GetStream () |
| Get image stream. More... | |
| def | IsImageMask () |
| Check if current image object is treated as mask. More... | |
| def | SetBitmap (bitmap, mask) |
| Set a bitmap to current image graphics object. More... | |
| def | SetImage (image, frame_index) |
| Set one frame of an image to current image graphics object. More... | |
Image graphics object is a kind of PDF graphics object, so class ImageObject is derived from class GraphicsObject . It offers functions to get/set image graphics object's data.
To create a new image graphics object, please use function fsdk.ImageObjectCreate and then use setting functions to set information to the new image graphics object.
| def fsdk.ImageObject.CloneBitmap | ( | graphics_objects | ) |
Currently, the bitmap can be cloned from image graphics object only when the bitmap format is one of following formats:
fsdk.BitmapE_DIB8bppMask , fsdk.BitmapE_DIB8bpp , fsdk.BitmapE_DIBRgb , fsdk.BitmapE_DIBRgb32 , fsdk.BitmapE_DIBArgb , fsdk.BitmapE_DIBCmyk .
If the return value of function fsdk.Bitmap.IsEmpty for the returned bitmap object is true, that means the DIB format of the bitmap is unsupported.
| [in] | graphics_objects | A valid fsdk.GraphicsObjects object. Please ensure that current image graphics object just belongs to this fsdk.GraphicsObjects object (it may be a PDF page). |
| def fsdk.ImageObject.CloneBitmap | ( | page, | |
| graphics_objects | |||
| ) |
Clone the bitmap from current image graphics object.
Currently, the bitmap can be cloned from image graphics object only when the bitmap format is one of following formats:
fsdk.BitmapE_DIB8bppMask , fsdk.BitmapE_DIB8bpp , fsdk.BitmapE_DIBRgb , fsdk.BitmapE_DIBRgb32 , fsdk.BitmapE_DIBArgb , fsdk.BitmapE_DIBCmyk .
If the return value of function fsdk.Bitmap.IsEmpty for the returned bitmap object is true, that means the DIB format of the bitmap is unsupported.
| [in] | page | A valid PDF page object. Please ensure that current image graphics object just belongs to this page. |
| [in] | graphics_objects | A valid fsdk.GraphicsObjects object. Please ensure that current image graphics object just belongs to this fsdk.GraphicsObjects object (it may be a PDF page). |
| def fsdk.ImageObject.GetColorSpace | ( | ) |
Get color space.
| def fsdk.ImageObject.GetMask | ( | ) |
Get the PDF object that represents the mask of current image graphics object.
The mask can be either a PDF dictionary or a PDF array:
A PDF dictionary represents an image mask to be applied to this image.
A PDF array represents a range of colors to be applied to it as a color key mask.
Please refer to Section 4.8.4 "Image Dictionaries" in <PDF Reference 1.7> for more details.
| def fsdk.ImageObject.GetStream | ( | ) |
Get image stream.
| def fsdk.ImageObject.IsImageMask | ( | ) |
Check if current image object is treated as mask.
| def fsdk.ImageObject.SetBitmap | ( | bitmap, | |
| mask | |||
| ) |
Set a bitmap to current image graphics object.
| [in] | bitmap | A valid bitmap object to be set to current image. |
| [in] | mask | Mask bitmap. Default value: A bitmap object by default constructor and not set any value, which means no mask is used. If this is valid, its format should be fsdk.BitmapE_DIB8bppMask . This is useful only when parameter bitmap does not have an alpha channel. |
| def fsdk.ImageObject.SetImage | ( | image, | |
| frame_index | |||
| ) |
Set one frame of an image to current image graphics object.
Input image may contain multiple frames, and only one frame of the image can be set to current image graphics object.
| [in] | image | A valid image object. This image should contain at least one frame and the image type should not be fsdk.ImageE_Unknown . |
| [in] | frame_index | Frame index used to decide which frame of parameter image is to be set. Valid range: from 0 to (count-1). count is returned by function fsdk.Image.GetFrameCount . |