IIXC_Image::Load Method

From PDF XChange PDF SDK
Jump to: navigation, search
m (Automatic page editing by robot)
m (Automatic page editing by robot)
 
(7 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
[[Category:Editor]]
 
[[Category:Editor]]
 
{{#customTitle:IIXC_Image::Load Method}}
 
{{#customTitle:IIXC_Image::Load Method}}
{{#parentPage:PXV:IIXC_Image|Load Method|method}}
+
{{#parentPage:PXV:IIXC_Image#Methods|Load|method}}
  
 
This method loads an image from the selected file.
 
This method loads an image from the selected file.
  
 
== Syntax ==
 
== Syntax ==
<pre class="brush:cpp;gutter:false">HRESULT Load([in]                  LPWSTR  pImagePath,
+
<pre class="brush:cpp;gutter:false">HRESULT Load([in]                  LPWSTR  sImagePath,
 
             [in, defaultvalue(0)]  ULONG  nFlags);</pre>
 
             [in, defaultvalue(0)]  ULONG  nFlags);</pre>
  
 
== Parameters ==
 
== Parameters ==
;pImagePath
+
;sImagePath
 
:[in]  Value of LPWSTR is the null-terminated file name string.
 
:[in]  Value of LPWSTR is the null-terminated file name string.
 
;nFlags
 
;nFlags
Line 17: Line 17:
  
 
== Return Value ==
 
== Return Value ==
Returns S_OK if operation was successful, or an error code if not.
+
Returns S_OK if the operation was successful, and will return an error code if it fails.
  
 
== Remarks ==
 
== Remarks ==
Line 23: Line 23:
  
 
== See Also ==
 
== See Also ==
:[[PXV:IIXC_Image|IIXC_Image]]
+
[[PXV:IIXC_Image|IIXC_Image]]
:[[PXV:IXC_ImageLoadFlags|IXC_ImageLoadFlags]]
+
:[[PXV:IIXC_Inst_CreateEmptyImage|IIXC_Inst::CreateEmptyImage]]
+
:[[PXV:IIXC_Image_LoadFromIStream|IIXC_Image::LoadFromIStream]]
+
:[[PXV:IIXC_Image_LoadFromMemory|IIXC_Image::LoadFromMemory]]
+
:[[PXV:IIXC_Image_Save|IIXC_Image::Save]]
+

Latest revision as of 03:15, 15 June 2015

This method loads an image from the selected file.

Syntax

HRESULT Load([in]                   LPWSTR  sImagePath,
             [in, defaultvalue(0)]  ULONG   nFlags);

Parameters

sImagePath
[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 the operation was successful, and will return an error code if it fails.

Remarks

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 multi-paged files, this may cause unnecessary memory usage and performance 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.

See Also

IIXC_Image