Accusoft.ThumbnailXpressSdk Namespace > ThumbnailItemCollection Class : AddItemFromStream Method |
'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 )
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.