blob.blobImage() (Method)

This method creates an <IMG> element having the appropriate MIME type for the blob object.

Availability:

JavaScript - 1.1
Netscape Enterprise Server - 2.0
Property/method value type:Image object
JavaScript syntax:NESmyBlob.blobImage(aFormat)
NESmyBlob.blobImage(aFormat, aTxt)
NESmyBlob.blobImage(aFormat, aTxt, anAlign)
NESmyBlob.blobImage(aFormat, aTxt, anAlign, aPixWid)
NESmyBlob.blobImage(aFormat, aTxt, anAlign, aPixWid, aPixHgt)
NESmyBlob.blobImage(aFormat, aTxt, anAlign, aPixWid, aPixHgt, aPixBrdr)
NESmyBlob.blobImage(aFormat, aTxt, anAlign, aPixWid, aPixHgt, aPixBrdr, isMap)
Argument list:aFormatImage file format
anAlignThe alignment of the image
aPixBrdrThe border value
aPixHgtThe height of the image
aPixWidThe width of the image
aTxtThe alt text for the image
isMapWhether the image is a map

The data is pulled out of the database according to the specified parameters. The BLOB can then be displayed as if it were an image in an <IMG> tag.

The format argument should contain an image specifier such as "GIF" or "JPEG" that can map conveniently to a file extension or MIME type.

The remaining parameters to this method mainly correspond to the HTML tag attributes that can be used with an <IMG> tag and are optional.

This method generates the necessary <IMG> tag to place into a document that refers to the BLOb data as if it were an image file on the server. When the document is parsed, the browser will request the image in the normal way; the contents of the BLOB are then returned in response to that request. The browser is not aware that the image data was retrieved from the database and by caching the image in memory when the link to it is placed in the document most of the latency associated with requesting objects out of the database is eliminated, albeit at the cost of increased memory usage in the server backend.

See also:Cursor.blobImage(),blob object,MIME types