Picture Field

Kirill Pekarov kirill_pekarov at valentina-db.com
Tue Mar 16 10:34:12 CDT 2010


Hi, Thomas.

You wrote 15.03.2010, 21:00:16:

> Hi,

> I'm saving .Net-Bitmaps with PixelFormat=Format8bppIndexed
> the a picturefield with
> fldBmp.WritePictureAs(bmp, EVPictType.kTIFF).
Now your picture stored in the TIFF format.

> When I read the bitmap later with:
> Dim bmp As Bitmap = fldBmp.ReadPicture

> I realized, that the bitmap now has a PixelFormat=Format32bppRgb
It is on fly conversion from TIFF to BMP format,

> Since I need to take care of the size of the database, how is my 8-bit-Image
> actually stored in the database? 8-bit or 32-bit? Are you also using a
> tiff-compression?
Yes, TIFF compression also must work. But, the compression value must
be different from "50" (default ADK value for JPG compression).

> Another question is: the picture-field has the flag "compression" set to true,
> meaning, that the tiffs are nicely compressed.
It can't be set to true. It is integer value from 0 to 100.
http://valentina-db.com/dokuwiki/doku.php?id=valentina:products:adk:api:vpicture_class:picture_methods#vpicture._writepictureas

Also VPicture field has no flag "compression". It is have property "DefQuality"
http://valentina-db.com/dokuwiki/doku.php?id=valentina:products:adk:api:vpicture_class:properties

> But some pictures are better saved as jpg. So when I save a bitmap with
> fldBmp.WritePictureAs(bmp, EVPictType.kJPG), will the database still try to
> compress it? This would be useless, since jpg is already compressed best.

fldBmp.WritePictureAs(bmp, EVPictType.kJPG) it is the same as
fldBmp.WritePictureAs(bmp, EVPictType.kJPG, 50) where "50" for JPEG it is 50% compression


-- 
Best regards,

Kirill Pekarov
Software Engineer Associate
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com



More information about the Valentina mailing list