Definitions for image functionality.
Definitions and functions in this module are included in fs_image_r.h and fs_image_w.h.
Module: Image
License Identifier: Image/All
Available License Right: Reading/Writing
For license Right Reading, see fs_image_r.h.
For license Right Writing, see fs_image_w.h.
More...
Classes | |
struct | FSCRT_BITMAP |
Handle type to bitmap. More... | |
struct | FSCRT_BITMAPINFOHEADER |
Structure for information about dimensions and color format of a device-independent bitmap (DIB). More... | |
struct | FSCRT_RGBQUAD |
Structure for a color consisting of relative intensities of red, green, and blue. More... | |
struct | FSCRT_BITMAPINFO |
Structure for dimensions and color information of a device-independent bitmap(DIB). More... | |
struct | FSCRT_IMAGE |
Handle type to image. More... | |
struct | FSCRT_IMAGEFILE |
Handle type to image file. More... | |
Functions | |
FS_RESULT | FSCRT_Bitmap_Create (FS_INT32 width, FS_INT32 height, FS_INT32 format, FS_LPVOID buffer, FS_INT32 stride, FSCRT_BITMAP *bitmap) |
Create a bitmap. More... | |
FS_RESULT | FSCRT_Bitmap_Release (FSCRT_BITMAP bitmap) |
Destroy a bitmap and release related resources. More... | |
FS_RESULT | FSCRT_Bitmap_FillRect (FSCRT_BITMAP bitmap, FS_ARGB color, const FSCRT_RECT *fillRect) |
Fill a bitmap object with a specified color. More... | |
FS_RESULT | FSCRT_Bitmap_GetFormat (FSCRT_BITMAP bitmap, FS_INT32 *format) |
Get format of a bitmap object. More... | |
FS_RESULT | FSCRT_Bitmap_GetSize (FSCRT_BITMAP bitmap, FS_INT32 *width, FS_INT32 *height) |
Get the size of a bitmap object. More... | |
FS_RESULT | FSCRT_Bitmap_GetLineBuffer (FSCRT_BITMAP bitmap, FS_INT32 lineIndex, FS_LPVOID *buffer) |
Get a line buffer of a bitmap object. More... | |
FS_RESULT | FSCRT_Bitmap_GetLineStride (FSCRT_BITMAP bitmap, FS_INT32 *stride) |
Get a row stride of the bitmap. More... | |
FS_RESULT | FSCRT_Bitmap_GetFlipped (FSCRT_BITMAP srcBitmap, FS_BOOL flipX, FS_BOOL flipY, FSCRT_BITMAP *dstBitmap) |
Swap X/Y dimensions of a bitmap object to generate rotated one. More... | |
FS_RESULT | FSCRT_Bitmap_StretchTo (FSCRT_BITMAP srcBitmap, FSCRT_BITMAP dstBitmap, FS_INT32 dstLeft, FS_INT32 dstTop, FS_INT32 dstWidth, FS_INT32 dstHeight, const FSCRT_RECT *dstClipRect, FS_INT32 interpolation) |
Stretch the source bitmap into a new bitmap with different size. More... | |
FS_RESULT | FSCRT_Bitmap_TransformTo (FSCRT_BITMAP srcBitmap, FSCRT_BITMAP dstBitmap, const FSCRT_MATRIX *matrix, const FSCRT_RECT *dstClipRect, FS_INT32 interpolation) |
Transform a source bitmap into destination one. More... | |
FS_RESULT | FSCRT_Bitmap_ConvertFormat (FSCRT_BITMAP bitmap, FS_INT32 format) |
Convert a bitmap to another specific format. More... | |
FS_RESULT | FSCRT_Bitmap_Clone (FSCRT_BITMAP bitmap, FSCRT_BITMAP *clonedBitmap) |
Clone a bitmap. More... | |
FS_RESULT | FSCRT_Bitmap_GetBitmapInfo (FSCRT_BITMAP bitmap, FSCRT_BITMAPINFO *bitmapInfo, FS_DWORD *size) |
Get bitmap information from a given Foxit DIB. More... | |
FS_RESULT | FSCRT_Bitmap_CalcBBox (FSCRT_BITMAP bitmap, FS_INT32 flag, FS_ARGB backColor, FS_INT32 windowSize, FS_INT32 tolerance, FSCRT_RECT *rectBBox) |
Calculate the bounding box of a bitmap. More... | |
FS_RESULT | FSCRT_Bitmap_GetMask (FSCRT_BITMAP bitmap, FSCRT_BITMAP *mask) |
Get the mask bitmap of a bitmap. More... | |
FS_RESULT | FSCRT_Image_LoadFromFile (FSCRT_FILE imageFile, FSCRT_IMAGE *image) |
Load an image from an image file. More... | |
FS_RESULT | FSCRT_Image_GetType (FSCRT_IMAGE image, FS_INT32 *type) |
Get an image type. More... | |
FS_RESULT | FSCRT_Image_GetSize (FSCRT_IMAGE image, FS_INT32 *width, FS_INT32 *height) |
Get width and height of an image. More... | |
FS_RESULT | FSCRT_Image_CountFrames (FSCRT_IMAGE image, FS_INT32 *count) |
Count frames of an image. More... | |
FS_RESULT | FSCRT_Image_LoadFrame (FSCRT_IMAGE image, FS_INT32 frameIndex) |
Load an image frame by index. More... | |
FS_RESULT | FSCRT_Image_GetCurrentFrameSize (FSCRT_IMAGE image, FS_INT32 *width, FS_INT32 *height) |
Get width and height of the current frame. More... | |
FS_RESULT | FSCRT_Image_GetCurrentFrameBitmap (FSCRT_IMAGE image, FSCRT_BITMAP *bitmap) |
Retrieve the bitmap of the current frame. More... | |
FS_RESULT | FSCRT_Image_GetProperty (FSCRT_IMAGE image, const FSCRT_BSTR *property, FSCRT_VAR *values, FS_INT32 *count) |
Get properties of an image. More... | |
FS_RESULT | FSCRT_Image_Release (FSCRT_IMAGE image) |
Release an image object. More... | |
FS_RESULT | FSCRT_ImageFile_Create (FSCRT_FILE file, FS_INT32 imageType, FS_INT32 frameCount, FSCRT_IMAGEFILE *imageFile) |
Create an image file. More... | |
FS_RESULT | FSCRT_ImageFile_SetProperty (FSCRT_IMAGEFILE imageFile, const FSCRT_BSTR *property, const FSCRT_VAR *values, FS_INT32 count) |
Set properties of image. More... | |
FS_RESULT | FSCRT_ImageFile_AddFrame (FSCRT_IMAGEFILE imageFile, FSCRT_BITMAP bitmap) |
Add a frame to image file. More... | |
FS_RESULT | FSCRT_ImageFile_Release (FSCRT_IMAGEFILE imageFile) |
Release an image file object. More... | |
Macro Definitions for Bitmap Format | |
#define | FSCRT_BITMAPFORMAT_24BPP_BGR 1 |
24bpp format, bits order: Blue, Green, Red. Blue is the lowest order. | |
#define | FSCRT_BITMAPFORMAT_32BPP_BGRx 2 |
32bpp format, bits order: Blue, Green, Red, not used. Blue is the lowest order. | |
#define | FSCRT_BITMAPFORMAT_32BPP_BGRA 3 |
32bpp format, bits order: Blue, Green, Red, Alpha. Blue is the lowest order. | |
#define | FSCRT_BITMAPFORMAT_8BPP_GRAY 4 |
8bpp format, gray scale. | |
#define | FSCRT_BITMAPFORMAT_24BPP_RGB 5 |
24bpp format, bits order: Red, Green, Blue. Red is the lowest order. | |
#define | FSCRT_BITMAPFORMAT_32BPP_RGBx 6 |
32bpp format, bits order: Red, Green, Blue, not used. Red is the lowest order. | |
#define | FSCRT_BITMAPFORMAT_32BPP_RGBA 7 |
32bpp format, bits order: Red, Green, Blue, Alpha. Red is the lowest order. | |
#define | FSCRT_BITMAPFORMAT_16BPP_RGB565 8 |
16bpp format, bits order: Red 5 bits, Green 6 bits, Blue 5 bits. Red is the lowest order. | |
#define | FSCRT_BITMAPFORMAT_8BPP_MASK 9 |
8bpp alpha mask. | |
#define | FSCRT_BITMAPFORMAT_1BPP_RGB 10 |
1bpp format, 0 for black, 1 for white. | |
Macro Definitions for ARGB Color Format | |
#define | FSCRT_ARGB_Encode(a, r, g, b) ((((FS_DWORD)(((FS_BYTE)(b) | ((FS_DWORD)((FS_BYTE)(g)) << 8)) | (((FS_DWORD)(FS_BYTE)(r)) << 16)))) | (((FS_DWORD)(FS_BYTE)(a)) << 24)) |
Used for encode ARGB color format. | |
#define | FSCRT_ARGB_GetAValue(argb) ((FS_BYTE)(((FS_DWORD)(argb)) >> 24)) |
Used for get the A value from ARGB color format. | |
#define | FSCRT_ARGB_GetRValue(argb) ((FS_BYTE)(((FS_DWORD)(argb)) >> 16)) |
Used for get the R value from ARGB color format. | |
#define | FSCRT_ARGB_GetGValue(argb) ((FS_BYTE)(((FS_DWORD)(argb)) >> 8)) |
Used for get the G value from ARGB color format. | |
#define | FSCRT_ARGB_GetBValue(argb) ((FS_BYTE)(argb)) |
Used for get the B value from ARGB color format. | |
Macro Definitions for stretching or transforming | |
#define | FSCRT_INTERPOLATION_DOWNSAMPLE 0x04 |
When set, do not do halftone for shrinking or rotating. | |
#define | FSCRT_INTERPOLATION_QUADRATIC 0x20 |
When set, do interpolation for stretching or transforming. | |
#define | FSCRT_INTERPOLATION_BICUBIC 0x80 |
When set, do bicubic interpolation for stretching or transforming. | |
Macro Definitions for calculation methods of bitmap bounding. | |
#define | FSCRT_BITMAPBBOX_DETECTION 0 |
Matching the given background color exactly. | |
#define | FSCRT_BITMAPBBOX_BACKCOLOR 1 |
Detecting a bounding box by analyzing a bitmap. | |
Macro definitions for image types | |
#define | FSCRT_IMAGETYPE_BMP 1 |
Image type is BMP. | |
#define | FSCRT_IMAGETYPE_JPG 2 |
Image type is JPG or JPeg. | |
#define | FSCRT_IMAGETYPE_PNG 3 |
Image type is PNG. | |
#define | FSCRT_IMAGETYPE_GIF 4 |
Image type is GIF. | |
#define | FSCRT_IMAGETYPE_TIF 5 |
Image type is TIF or TIFF. | |
#define | FSCRT_IMAGETYPE_JPX 6 |
Image type is JPX or JPeg-2000. | |
#define | FSCRT_IMAGETYPE_JBIG2 8 |
Image type is JBIG2. More... | |
Macro definitions for image properties | |
| |
#define | FSCRT_IMAGEPROPERTY_DPI "dpi" |
DPI, that is Dot-Per-Inch. More... | |
Definitions for image functionality.
Definitions and functions in this module are included in fs_image_r.h and fs_image_w.h.
Module: Image
License Identifier: Image/All
Available License Right: Reading/Writing
For license Right Reading, see fs_image_r.h.
For license Right Writing, see fs_image_w.h.
This module contains the following features:
#define FSCRT_IMAGEPROPERTY_DPI "dpi" |
DPI, that is Dot-Per-Inch.
#define FSCRT_IMAGETYPE_JBIG2 8 |
Image type is JBIG2.
FS_RESULT FSCRT_Bitmap_CalcBBox | ( | FSCRT_BITMAP | bitmap, |
FS_INT32 | flag, | ||
FS_ARGB | backColor, | ||
FS_INT32 | windowSize, | ||
FS_INT32 | tolerance, | ||
FSCRT_RECT * | rectBBox | ||
) |
Calculate the bounding box of a bitmap.
[in] | bitmap | Handle to a FSCRT_BITMAP object which is a bitmap object. |
[in] | flag | Method flag is used to specify how to calculate a bounding box, FSCRT_BITMAPBBOX_DETECTION means matching a given background color backColor exactly, FSCRT_BITMAPBBOX_BACKCOLOR means detecting bounding box by analyzing bitmap contents. |
[in] | backColor | Background color. It shall be valid only when the parameter flag is 0. |
[in] | windowSize | Detection size to analyze background, it shall valid only when parameter flag is 1. |
[in] | tolerance | Tolerance to indicate color difference when detecting a bounding box, it shall be valid only when the parameter flag is 1. Its value should be between 0 and 255, and the suggested value is 64. |
[out] | rectBBox | Pointer to a FSCRT_RECT structure that receives a bounding box rectangle. |
FS_RESULT FSCRT_Bitmap_Clone | ( | FSCRT_BITMAP | bitmap, |
FSCRT_BITMAP * | clonedBitmap | ||
) |
Clone a bitmap.
[in] | bitmap | Handle to a FSCRT_BITMAP object which is a bitmap object. |
[out] | clonedBitmap | Pointer to a FSCRT_BITMAP handle that receives a cloned bitmap. Applications should release it by calling function FSCRT_Bitmap_Release. |
Convert a bitmap to another specific format.
[in] | bitmap | Handle to a bitmap object which is a source bitmap. |
[in] | format | New bitmap format type. Please refer to macro definitions FSCRT_BITMAPFORMAT_XXX and this should be one of these macros. |
FS_RESULT FSCRT_Bitmap_Create | ( | FS_INT32 | width, |
FS_INT32 | height, | ||
FS_INT32 | format, | ||
FS_LPVOID | buffer, | ||
FS_INT32 | stride, | ||
FSCRT_BITMAP * | bitmap | ||
) |
Create a bitmap.
If the parameter buffer is not NULL, it should be initialized by application; otherwise, Foxit PDF SDK will allocate and initialize the pixels buffer internally.
Application is suggested to use the same colors to initialize bitmaps' pixels buffer as Foxit PDF SDK uses internally:
[in] | width | Width of a bitmap, in pixels. |
[in] | height | Height of a bitmap, in pixels. |
[in] | format | Bitmap format type. Please refer to macro definitions FSCRT_BITMAPFORMAT_XXX and this should be one of these macros. |
[in] | buffer | Pointer to a buffer that specifies bitmap data. If it is not NULL, this function will use the parameter buffer to initialize a bitmap. In this case, please do not free the parameter buffer before the parameter bitmap is released. If it is NULL, a new bitmap buffer will be created internally. |
[in] | stride | The number of bytes for each scan line, for an external buffer only. If not specified, 4-byte alignment is assumed. |
[out] | bitmap | Pointer to a FSCRT_BITMAP handle that receives a created bitmap handle. |
FS_RESULT FSCRT_Bitmap_FillRect | ( | FSCRT_BITMAP | bitmap, |
FS_ARGB | color, | ||
const FSCRT_RECT * | fillRect | ||
) |
Fill a bitmap object with a specified color.
If the format of bitmap is FSCRT_BITMAPFORMAT_8BPP_GRAY, the gray value for parameter color is computed according to the NTSC video standard, which determines how a color television signal is rendered on a black-and-white television set:
gray = 0.3*red + 0.59*green + 0.11*blue
For more details, please refer to session 6.2.1 "Conversion between DeviceGray and DeviceRGB" in PDF Reference1.7 page 481.
[in] | bitmap | Handle to a FSCRT_BITMAP object which is a bitmap object. |
[in] | color | Color to fill. If the alpha component is 0 and the filling rectangle is specified, then no color would be filled. |
[in] | fillRect | Pointer to a FSCRT_RECT structure to specify a filling rectangle. If it is NULL, the whole bitmap will be filled with a specific color. |
FS_RESULT FSCRT_Bitmap_GetBitmapInfo | ( | FSCRT_BITMAP | bitmap, |
FSCRT_BITMAPINFO * | bitmapInfo, | ||
FS_DWORD * | size | ||
) |
Get bitmap information from a given Foxit DIB.
Usually, this function needs to be called twice:
At the first time, set the parameter bitmapInfo to be NULL and get the buffer size, which is returned in the parameter size.
The size is used to allocate bitmapInfo.
At the second time, input bitmapInfo and its size. When this function returns successfully, bitmapInfo will get bitmap information.
The size of bitmapInfo shall not be less than buffer size, and the parameter size shall not be empty.
[in] | bitmap | Handle to a FSCRT_BITMAP object which is a bitmap object. |
[out] | bitmapInfo | Pointer to a FSCRT_BITMAPINFO object that recieves dimensions and color information of a bitmap. If this parameter is NULL, the parameter size will receive buffer size of bitmapInfo in bytes. |
[in,out] | size | Pointer to a FS_DWORD object. It shall not be NULL. When it is an input parameter, it should be the size of the structure of the parameter bitmapInfo points to. When it is a return value, it receives an actual buffer size, which is necessary for allocating bitmapInfo when input bitmapInfo is NULL. |
FS_RESULT FSCRT_Bitmap_GetFlipped | ( | FSCRT_BITMAP | srcBitmap, |
FS_BOOL | flipX, | ||
FS_BOOL | flipY, | ||
FSCRT_BITMAP * | dstBitmap | ||
) |
Swap X/Y dimensions of a bitmap object to generate rotated one.
[in] | srcBitmap | Handle to a FSCRT_BITMAP object which is a bitmap object. |
[in] | flipX | A boolean value to indicate whether a flipping image is in horizontal direction (left/right). If it is TRUE, a bitmap will be flipped in horizontal direction. |
[in] | flipY | A boolean value to indicate whether a flipping image is in vertical direction (up/down). If it is TRUE, a bitmap will be flipped in vertical direction. |
[out] | dstBitmap | Pointer to a FSCRT_BITMAP handle that receives a result bitmap handle. Applications should release it by calling the function FSCRT_Bitmap_Release. |
Get format of a bitmap object.
[in] | bitmap | Handle to a FSCRT_BITMAP object which is a bitmap object. |
[out] | format | Pointer to a FS_INT32 object that receives the current bitmap format. Please refer to macro definitions FSCRT_BITMAPFORMAT_XXX and this would be one of these macros. |
FS_RESULT FSCRT_Bitmap_GetLineBuffer | ( | FSCRT_BITMAP | bitmap, |
FS_INT32 | lineIndex, | ||
FS_LPVOID * | buffer | ||
) |
Get a line buffer of a bitmap object.
Bitmap data are organized in scan-lines, from top to down.
[in] | bitmap | Handle to a FSCRT_BITMAP object which is a bitmap object. |
[in] | lineIndex | The index of scan-line, from 0 to the (height-1) of bitmap. |
[out] | buffer | Pointer to a FS_LPVOID object that receives the buffer address of scan-line. The bitmap buffer is continuous in the memory, so if want to receive the whole bitmap buffer, please set lineIndex to 0. |
Get a row stride of the bitmap.
[in] | bitmap | Handle to a FSCRT_BITMAP object which is a bitmap object. |
[out] | stride | Pointer to a FS_INT32 object that receives the row stride of the bitmap. |
FS_RESULT FSCRT_Bitmap_GetMask | ( | FSCRT_BITMAP | bitmap, |
FSCRT_BITMAP * | mask | ||
) |
Get the mask bitmap of a bitmap.
[in] | bitmap | Handle to a FSCRT_BITMAP object which is a bitmap object. |
[out] | mask | Pointer to a FSCRT_BITMAP handle that receives the mask bitmap. If there is no mask bitmap, mask will be NULL. Applications should release it by calling function FSCRT_Bitmap_Release. |
Get the size of a bitmap object.
[in] | bitmap | Handle to a FSCRT_BITMAP object which is a bitmap object. |
[out] | width | Pointer to a FS_INT32 object that receives the width of bitmap in pixels. |
[out] | height | Pointer to a FS_INT32 object that receives the height of bitmap in pixels. |
FS_RESULT FSCRT_Bitmap_Release | ( | FSCRT_BITMAP | bitmap | ) |
Destroy a bitmap and release related resources.
If an external buffer is used (specified by the parameter buffer in calling the function FSCRT_Bitmap_Create), it will not be destroyed.
[in] | bitmap | Handle to a FSCRT_BITMAP object which is a bitmap object. |
FS_RESULT FSCRT_Bitmap_StretchTo | ( | FSCRT_BITMAP | srcBitmap, |
FSCRT_BITMAP | dstBitmap, | ||
FS_INT32 | dstLeft, | ||
FS_INT32 | dstTop, | ||
FS_INT32 | dstWidth, | ||
FS_INT32 | dstHeight, | ||
const FSCRT_RECT * | dstClipRect, | ||
FS_INT32 | interpolation | ||
) |
Stretch the source bitmap into a new bitmap with different size.
[in] | srcBitmap | Handle to a FSCRT_BITMAP object which is the source bitmap object. |
[in] | dstBitmap | Handle to a FSCRT_BITMAP object which is the destination bitmap object. |
[in] | dstLeft | Left position in the destination bitmap from which the source bitmap stretch. |
[in] | dstTop | Top position in the destination bitmap from which the source bitmap stretch. |
[in] | dstWidth | Width in the destination bitmap. |
[in] | dstHeight | Height in the destination bitmap. |
[in] | dstClipRect | Pointer to a FSCRT_RECT structure which is the clipping rectangle in the destination bitmap. |
[in] | interpolation | An integer value, representing which interpolation algorithm will be used to stretch a bitmap. Please refer to macro definitions FSCRT_INTERPOLATION_XXX and this should be one of these macros. |
FS_RESULT FSCRT_Bitmap_TransformTo | ( | FSCRT_BITMAP | srcBitmap, |
FSCRT_BITMAP | dstBitmap, | ||
const FSCRT_MATRIX * | matrix, | ||
const FSCRT_RECT * | dstClipRect, | ||
FS_INT32 | interpolation | ||
) |
Transform a source bitmap into destination one.
[in] | srcBitmap | Handle to a FSCRT_BITMAP object which is a source bitmap object. |
[in] | dstBitmap | Handle to a FSCRT_BITMAP object which is a destination bitmap object. |
[in] | matrix | Pointer to a FSCRT_MATRIX structure to specify a transformation matrix. |
[in] | dstClipRect | Pointer to a FSCRT_RECT structure which is the clipping rectangle in destination bitmap. |
[in] | interpolation | An integer value, representing which interpolation algorithm will be used to transform a bitmap. Please refer to macro definitions FSCRT_INTERPOLATION_XXX and this should be one of these macros. |
Count frames of an image.
[in] | image | Handle to a FSCRT_IMAGE object which is an image object. |
[out] | count | Pointer to a FS_INT32 object that receives count of all image frames. |
FS_RESULT FSCRT_Image_GetCurrentFrameBitmap | ( | FSCRT_IMAGE | image, |
FSCRT_BITMAP * | bitmap | ||
) |
Retrieve the bitmap of the current frame.
[in] | image | Handle to a FSCRT_IMAGE object which is an image object. |
[out] | bitmap | Pointer to a FSCRT_BITMAP object that receives the retrieved bitmap object. |
FS_RESULT FSCRT_Image_GetCurrentFrameSize | ( | FSCRT_IMAGE | image, |
FS_INT32 * | width, | ||
FS_INT32 * | height | ||
) |
Get width and height of the current frame.
[in] | image | Handle to a FSCRT_IMAGE object which is an image object. |
[out] | width | Pointer to a FS_INT32 object that receives width of the current frame. |
[out] | height | Pointer to a FS_INT32 object that receives height of current frame. |
FS_RESULT FSCRT_Image_GetProperty | ( | FSCRT_IMAGE | image, |
const FSCRT_BSTR * | property, | ||
FSCRT_VAR * | values, | ||
FS_INT32 * | count | ||
) |
Get properties of an image.
[in] | image | Handle to a FSCRT_IMAGE object which is an image object. |
[in] | property | Pointer to a FSCRT_BSTR structure that specifies the property information of the image, such as EXIF info. Currently, only dpi property is supported. Please refer to macro definition FSCRT_IMAGEPROPERTY_DPI. |
[in,out] | values | Pointer to a FSCRT_VAR object that receives values, it can be NULL. |
[in,out] | count | Pointer to a FS_INT32 object that receives count of values. |
Get width and height of an image.
Currently, this function does not support TIF format images. If use this function for TIF image, width and height of TIF image will be 0.
[in] | image | Handle to a FSCRT_IMAGE object which is an image object. |
[out] | width | Pointer to a FS_INT32 object that receives width of image. |
[out] | height | Pointer to a FS_INT32 object that receives height of image. |
Get an image type.
[in] | image | Handle to a FSCRT_IMAGE object which is an image object. |
[out] | type | Pointer to a FS_INT32 object that receives an image type. Please refer to macro definitions FSCRT_IMAGETYPE_XXX and this would be one of these macros. |
Load an image frame by index.
[in] | image | Handle to a FSCRT_IMAGE object which is an image object. |
[in] | frameIndex | The index of a given frame. |
FS_RESULT FSCRT_Image_LoadFromFile | ( | FSCRT_FILE | imageFile, |
FSCRT_IMAGE * | image | ||
) |
Load an image from an image file.
Foxit PDF SDK supports six types of image files, and they are specified by macro definitions FSCRT_IMAGETYPE_XXX.
[in] | imageFile | Handle to a FSCRT_FILE object which is an image file object. |
[out] | image | Pointer to a FSCRT_IMAGE handle that receives a handle of image object. |
FS_RESULT FSCRT_Image_Release | ( | FSCRT_IMAGE | image | ) |
Release an image object.
[in] | image | Handle to a FSCRT_IMAGE object which is an image object. |
FS_RESULT FSCRT_ImageFile_AddFrame | ( | FSCRT_IMAGEFILE | imageFile, |
FSCRT_BITMAP | bitmap | ||
) |
Add a frame to image file.
Frame number should match image type. For example, a TIF file supports multiple frames. Applications can add a frame or multiple frames several times.
[in] | imageFile | Handle to a FSCRT_IMAGEFILE object which is an image file object. |
[in] | bitmap | Handle to a FSCRT_BITMAP object which is a bitmap object to be inserted an image file as a new frame. Currently, it can not support:
|
FS_RESULT FSCRT_ImageFile_Create | ( | FSCRT_FILE | file, |
FS_INT32 | imageType, | ||
FS_INT32 | frameCount, | ||
FSCRT_IMAGEFILE * | imageFile | ||
) |
Create an image file.
Currently, this function does not support GIF format.
[in] | file | Handle to a FSCRT_FILE object which is a file object. It should be a new image file, which is to be created. |
[in] | imageType | Image type. It should be one of the following macro definitions: |
[in] | frameCount | How many frames to be created. This parameter can be larger than 1 for TIF because only TIF format supports multiple frames. Return FSCRT_ERRCODE_UNSUPPORTED when it is larger than 1 for the other formats. |
[out] | imageFile | Pointer to a FSCRT_IMAGEFILE handle which is an image file object. |
FS_RESULT FSCRT_ImageFile_Release | ( | FSCRT_IMAGEFILE | imageFile | ) |
Release an image file object.
Save all image data into a file, and destroy image file objects.
[in] | imageFile | Handle to a FSCRT_IMAGEFILE object which is an image file object. |
FS_RESULT FSCRT_ImageFile_SetProperty | ( | FSCRT_IMAGEFILE | imageFile, |
const FSCRT_BSTR * | property, | ||
const FSCRT_VAR * | values, | ||
FS_INT32 | count | ||
) |
Set properties of image.
Currently, this function does not support JPX, GIF and TIF format.
[in] | imageFile | Handle to a FSCRT_IMAGEFILE object which is an image file object. |
[in] | property | Pointer to a FSCRT_BSTR structure which specifies a property name of an image, such as "dpi". Currently only dpi property is supported. Please refer to macro definition FSCRT_IMAGEPROPERTY_DPI. |
[in] | values | Pointer to a FSCRT_VAR structure array which represents the values associated to some property. |
[in] | count | Count of elements in parameter values. |