IIXC_Image::Load Method
From Tracker Software PDF SDK
m (Automatic page editing by robot) |
|||
Line 2: | Line 2: | ||
{{#customTitle:IIXC_Image::Load Method}} | {{#customTitle:IIXC_Image::Load Method}} | ||
{{#parentPage:PXV:IIXC_Image|Load Method|method}} | {{#parentPage:PXV:IIXC_Image|Load Method|method}} | ||
− | + | ||
{{ToReview}} | {{ToReview}} | ||
− | The method | + | The method loads an image from the selected file. |
== Syntax == | == Syntax == | ||
Line 13: | Line 13: | ||
== Parameters == | == Parameters == | ||
;pImagePath | ;pImagePath | ||
− | :[in] Value of LPWSTR. | + | :[in] Value of LPWSTR is the null-terminated file name string. |
;nFlags | ;nFlags | ||
− | :[in, defaultvalue(0)] | + | :[in, defaultvalue(0)] The following [[PXV:IXC_ImageLoadFlags|flag]] can be used to specify how the image will be loaded. |
== Return Value == | == Return Value == | ||
Returns S_OK if operation was successful or error code in other cases. | Returns S_OK if operation was successful or error code in other cases. | ||
+ | |||
+ | == Comments == | ||
+ | By default '''Load''' opens the image file, acquires information about all pages, decodes all of them, and closes the file. This is a good approach for single page files, but when dealing with large multipaged files this may cause unnecessary memory usage and perfomance degradation. To avoid this situation '''Load''' should be called with the [[PXV:IXC_ImageLoadFlags|ImageLoad_Deferred]] flag. In this case the image file will be analyzed, information about its pages will be acquired, but actual page data will not be decoded immediately. | ||
== See Also == | == See Also == | ||
− | + | :[[PXV:IIXC_Image|IIXC_Image]] | |
+ | :[[PXV:IXC_ImageLoadFlags|IXC_ImageLoadFlags]] |
Revision as of 06:11, 7 May 2015
The method loads an image from the selected file.
Syntax
HRESULT Load([in] LPWSTR pImagePath, [in, defaultvalue(0)] ULONG nFlags);
Parameters
- pImagePath
- [in] Value of LPWSTR is the null-terminated file name string.
- nFlags
- [in, defaultvalue(0)] The following flag can be used to specify how the image will be loaded.
Return Value
Returns S_OK if operation was successful or error code in other cases.
Comments
By default Load opens the image file, acquires information about all pages, decodes all of them, and closes the file. This is a good approach for single page files, but when dealing with large multipaged files this may cause unnecessary memory usage and perfomance degradation. To avoid this situation Load should be called with the ImageLoad_Deferred flag. In this case the image file will be analyzed, information about its pages will be acquired, but actual page data will not be decoded immediately.