Accusoft.ThumbnailXpress6.Net
AddItemFromStream Method




The thumbnail to add.
Adds the provided ThumbnailItem to the end of the collection. The display is updated if appropriate. Rather than obtaining its image data from a supplied filename/path, the image data will be expected to be provided by a System.IO.Stream object.
Syntax
'Declaration
 
Public Function AddItemFromStream( _
   ByVal item As ThumbnailItem _
) As Integer
'Usage
 
Dim instance As ThumbnailItemCollection
Dim item As ThumbnailItem
Dim value As Integer
 
value = instance.AddItemFromStream(item)
public int AddItemFromStream( 
   ThumbnailItem item
)
public: int AddItemFromStream( 
   ThumbnailItem* item
) 
public:
int AddItemFromStream( 
   ThumbnailItem^ item
) 

Parameters

item
The thumbnail to add.

Return Value

Returns the new count of total thumbnails.
Remarks

The Stream object may optionally be associated with the ThumbnailItem using its ThumbnailItem.FromStream method before AddItemFromStream is called. However, a ThumbnailXpressEvents.LoadFromStreamEventHandlermust be supplied by the application and a stream object containing the image data must be supplied during processing of the event handler. Note that the event must be handled because at any time a stream-supplied thumbnail image can be scrolled out of the ThumbnailXpress image chache, and to redisplay, the component needs to re-obtain from the application the image data stream. Additionally, the ThumbnailItem passed to AddItemFromStream must contain a valid ThumbnailItem.UserTag object that allows the application to identify the stream object that will provide the image data for the item.

This method does not wait for images to be generated before returning. The thumbnail images are generated in the background. This means a thumbnail's image data (for example, its bitmap) is likely not available immediately after this method returns. Use the ThumbnailXpress.ItemComplete event to determine when an item's image has completed being generated before attempting to programmatically access its image data

PDF support is deprecated in ImagXpress, please use PDF Xpress instead for PDF support via the Licensing.UsePdfXpressForPDFsOnly property.

See Also

Reference

ThumbnailItemCollection Class
ThumbnailItemCollection Members

 

 


©2015. Accusoft Corporation. All Rights Reserved.

Send Feedback