Switch to: V11V10V9V8V7V6V5

VPicture Class: Picture Methods

VPicture.ReadPicture()

Declaration:

ReadPicture() as Picture

Description:

Reads a picture from the VPicture field and returns it as a Picture to REALbasic. The picture in the database can be in any supported format.

Note, ReadPicture also can show pictures that was added into database using VBLOB.FromFile() method.

Example:

dim pict as Picture
pict = fldPicture.ReadPicture() 

VPicture. WritePictureAs()

Declaration:

WritePictureAs( 
	inPict as Picture, 
	inPictType as EVPictureType = kJPG, 
	inQuality as Integer = 50)

Parameters:

  • inPict - The Picture to be stored.
  • inPictType - The picture format.
  • inQuality - Compression rate, 0..100, default is 50.

Description:

Stores a Picture into VPicture field using the specified format.

Parameter Quality can be in the range 0..100 and specify quality of a jpeg compression. The larger the value the better the quality. This parameter can be ignored if the picture format does not require it, e.g. TIFF.

This method expect that Picture is

  • DIB on Windows.
  • PICT on MAC.

Note, PICT with JPG compression also is accepted if you specify inPictType as kJPG.

Example:

fldPicture.WritePictureAs( inPict, EVPicture.kJPG, 50 )