Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Help: what is a packed DIB?

69 views
Skip to first unread message

Jason Wang

unread,
Jan 23, 1997, 3:00:00 AM1/23/97
to

Hi,
Does anybody knows what is a 'packed DIB' ? What's the difference
between a packed DIB and a normal DIB ? Any answer will be appreciated.

Jason

Zachary D. Bonham

unread,
Jan 23, 1997, 3:00:00 AM1/23/97
to

Jason,

I have never heard of a 'packed DIB' (or at least that phrase), however,
some DIBs can have a simple Run Length Encoding applied to them to try to
get smaller file sizes. Doesn't work so good on actual photographic images
and isn't very common.

You will find that while most appications (imaging) will read this format,
most will only write out an unencoded DIB.

I *think* this is what your looking for. I would refer to the Win32 SDK
for more information.

--
Zachary D. Bonham
T-BASE, Instant Images
Videotex Systems, Inc.
bon...@videotexsystems.com
http://www.videotexsystems.com

Jason Wang <jaso...@ms7.hinet.net> wrote in article
<32E701...@ms7.hinet.net>...

Mike Enright

unread,
Jan 28, 1997, 3:00:00 AM1/28/97
to

Jason Wang <jaso...@ms7.hinet.net> wrote:

>Hi,
> Does anybody knows what is a 'packed DIB' ? What's the difference
>between a packed DIB and a normal DIB ? Any answer will be appreciated.
>

I believe it means that the BITMAPINFO data is stored with the pixels.
I've seen the term in MS samples that contain a set of functions that
take a memory handle and operate on that handle as if it pointed to a
BITMAPINFOHEADER [followed by palette data if needed] followed by the
pixel data. When the routines needed to access the pixel data they had
to do an elaborate calculation based on the numbers in the
BITMAPINFOHEADER. On the other hand, the code only needed one memory
handle for the whole ball of wax; an important factor in Win16.


--
Mike Enright
menr...@cts.com
http://www.users.cts.com/sd/m/menright/
Cardiff-by-the-Sea, California, USA


Scott M Sheaf

unread,
Jan 28, 1997, 3:00:00 AM1/28/97
to

This is the definition of a packed DIB as given in "Programming Windows
95", Charles Petzold.

If you ancounter a DIB file that you would like to read into a windows
program, you can read it directly into a block of allocated memory. This
is know as the packed-DIB memory format. It consists of everything in the
DIB file except the BITMAPFILEHEADER structure, which is the first 14 bytes
of the DIB.

Hope this helps.

Scott Sheaf
sh...@battelle.org


Jason Wang <jaso...@ms7.hinet.net> wrote in article
<32E701...@ms7.hinet.net>...

> Hi,
> Does anybody knows what is a 'packed DIB' ? What's the difference
> between a packed DIB and a normal DIB ? Any answer will be appreciated.
>

> Jason
>

Richard Odenweller

unread,
Jan 28, 1997, 3:00:00 AM1/28/97
to

The most important thing to remember is a packed DIB is a contiguous block
of memory. If you have access to the MSDN library, do a query on CDIB for
an example of a C++ class that handles packed DIB's.

Bill Wagner

unread,
Jan 29, 1997, 3:00:00 AM1/29/97
to

"Zachary D. Bonham" <bon...@videotexsystems.com> wrote:


>Jason Wang <jaso...@ms7.hinet.net> wrote in article
><32E701...@ms7.hinet.net>...
>> Hi,
>> Does anybody knows what is a 'packed DIB' ? What's the difference
>> between a packed DIB and a normal DIB ? Any answer will be appreciated.
>>
>> Jason
>>

A packed DIB is a DIB where the bits immediately follow the header and
color table in memory. (Address of 1st pixel = Address of header +
sizeof header + sizeof color table)

That is all it is.

-bill

0 new messages