Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Monday, February 6, 2006 7:10:23 AM(UTC)
tteveris

Groups: Registered
Posts: 32


Using L_ChangeToDIB(pBitmap, uType) is there any way to control the bV5Compression parameter or does the LEAD tools determine the best fit ?

I would like to use the DIB_BITMAPV5HEADER type.

uType Type of DIB to create. Possible values are:

Value Meaning

DIB_BITMAPINFOHEADER [0] DIB that uses a BITMAPINFOHEADER

DIB_BITMAPV4HEADER [1] DIB that uses a BITMAPV4HEADER. (Introduced in Windows 95 and Windows NT 4.0)

DIB_BITMAPV5HEADER [2] DIB that uses a BITMAPV5HEADER (Introduced in Windows 2000 and Windows 98)

 

bV5Compression

Specifies that the bitmap is not compressed. The bV5RedMask, bV5GreenMask, and bV5BlueMask members specify the red, green, and blue components of each pixel. This is valid when used with 16- and 32-bpp bitmaps. This member can be one of the following values. Value Meaning

BI_RGB An uncompressed format.

BI_RLE8 A run-length encoded (RLE) format for bitmaps with 8 bpp. The compression format is a two-byte format consisting of a count byte followed by a byte containing a color index. If bV5Compression is BI_RGB and the bV5BitCount member is 16, 24, or 32, the bitmap array specifies the actual intensities of blue, green, and red rather than using color table indexes. For more information, see Bitmap Compression.

BI_RLE4 An RLE format for bitmaps with 4 bpp. The compression format is a two-byte format consisting of a count byte followed by two word-length color indexes. For more information, see Bitmap Compression.

BI_BITFIELDS Specifies that the bitmap is not compressed and that the color table consists of three DWORD color masks that specify the red, green, and blue components of each pixel. Valid when used with 16- and 32-bpp bitmaps.

BI_JPEG Specifies that the image is compressed using the JPEG file Interchange Format. JPEG compression trades off compression against loss; it can achieve a compression ratio of 20:1 with little noticeable loss.

BI_PNG Specifies that the image is compressed using the PNG file Interchange Format.

Thanks in advance

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Wednesday, February 8, 2006 3:24:14 AM(UTC)

Amin  
Amin

Groups: Manager, Tech Support
Posts: 367

Was thanked: 1 time(s) in 1 post(s)

You should be able to use the DIB_BITMAPV5HEADER type, but the bitmap
that results will be uncompressed. There is no function in LEADTOOLS to
automatically generate one of the compressed DIB types. If you need a
compressed type DIB, you will have to manually access the structure and bitmap buffer, modify the header yourself and compress the data.

Amin Dodin

Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.055 seconds.