Use the DB2Image, DB2Audio, or DB2Video UDF in an SQL INSERT statement to store an image, audio, or video object in a database.
You can store an object whose source is in a buffer or file in a client machine or in a server file. For any of these sources, you can store the object in a database table as a BLOB, or in a file on the database server.
When you request the UDF, you need to specify:
The Image, Audio, and Video Extenders allow you to store an object even if they do not recognize the object's format. In cases where the format is not recognized, you need to specify the attributes of the object. When you store an image or video with user-supplied attributes, you can also store a thumbnail. A thumbnail is a miniature image representing the image or video.
For images only, you have the option of having the format of the image converted when it is stored. If you request format conversion, you need to specify both the source and target formats of the image. In a format conversion request, you can also specify further changes to the image, such as cropping it or rotating it. You indicate these changes by specifying conversion options.
Commit the store operation: Commit the unit of work after you store an image, audio, or video object in a database. This frees up locks that the extenders hold so that you can perform update operations on the stored object.