Image | Audio | Video |
---|---|---|
X | X |
Returns or updates a thumbnail-size version of an image or video frame that is stored in a database.
Include file
Syntax
Retrieve a thumbnail
>>-Thumbnail--(--handle--)-------------------------------------><
Syntax
Update a thumbnail
>>-Thumbnail--(--handle--,--new_thumbnail--)-------------------><
Parameters (data type)
Return values (data type)
For retrieval, the content of the retrieved thumbnail (LONG VARCHAR FOR BIT DATA) for update, the handle of the image or video (DB2IMAGE or DB2VIDEO).
Examples
Get the thumbnail of Anita Jones's image stored in the employee table:
EXEC SQL BEGIN DECLARE SECTION; struct{ short len; char data [32000]; }hvThumbnail; EXEC SQL END DECLARE SECTION; EXEC SQL SELECT THUMBNAIL(PICTURE) INTO :hvThumbnail FROM EMPLOYEE WHERE NAME = 'Anita Jones';
Update the thumbnail that is associated with Anita Jones's video in the employee table:
EXEC SQL BEGIN DECLARE SECTION; struct { short len; char data[10000]; }hvThumbnail; EXEC SQL END DECLARE SECTION; /* Create thumbnail and */ /* store in hvThumbnail */ EXEC SQL UPDATE EMPLOYEE SET VIDEO=THUMBNAIL( VIDEO, :hvThumbnail) WHERE NAME='Anita Jones';