IBM Books

Image, Audio, and Video Extenders Administration and Programming

Thumbnail


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

image
dmbimage.h

video
dmbvideo.h

Syntax

Retrieve a thumbnail

>>-Thumbnail--(--handle--)-------------------------------------><
 

Syntax

Update a thumbnail

>>-Thumbnail--(--handle--,--new_thumbnail--)-------------------><
 

Parameters (data type)

handle (DB2IMAGE or DB2VIDEO)
Column name or host variable that contains the handle of the image or video.

new_thumbnail (LONG VARCHAR FOR BIT DATA)
Source content for update of thumbnail

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';


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]