Hi everyone.

Are bitmaps the only graphic file format allowed in Windows application (i.e. a dialog box) ?
It would be nice to use compressed formats such as .jpeg, since bitmaps are a little too big...

Thanx, Saiwa
Posted on 2001-08-28 03:27:42 by Saiwa
Windows only uses bitmaps but if you want to use GIFs you can use my gif library (4kb, written in asm and with source code) at my site exagone.cjb.net.

Posted on 2001-08-28 03:47:51 by Thomas

I use an old copy of Paint Shop Pro that enables you to save
bmp files using Run Length Encoding (RLE). This seems to
work just fine with masm. For example a logo I use is about
44K using the normal bmp format. The same logo bmp saved
using RLE is about 11K. This works great in my app using the
LoadImage API. Try it, it can really drop the size of your app
especially if your app has more then a few bmps in it.;)
Posted on 2001-08-28 07:46:01 by bcraven
You could download Intel's jpg lib http://win32asm.rxsp.com/files/senfijl.zip or thers also ImageVu, which shows how to use NishitaView library, it can display *.BMP; *.DIB; *.GIF; *.JIF; *.JPG; *.JPEG; *.PCX; *.RLE; *.TGA images

Posted on 2001-08-28 08:16:38 by NEMO
RLE obviously only works if you have large "runs" of the same color.
For graphics where you'd use JPG (photos, many-colored logos, etc)
RLE will not help you, and might end up giving you larger files :(.
If you use *many* pictures, finding a jpg decompressor is probably
the best thing to do. But I suppose you have to use a LOT of pictures,
because the jpg decompressors I have seen have been pretty big.

Or, if you don't care about operating systems older than win98/win2k,
you can use their native support for jpg decompression... dunno how
this is implemented, though. When I had a short peek, it seemed
to me that the format was a bmp header with jpg data???
Posted on 2001-08-28 09:28:24 by f0dder

Yes you are correct about RLE but the man said and I quote:

"Are bitmaps the only graphic file format allowed in Windows
application (i.e. a dialog box) ?"

The key word is dialog box. Most bmps you come across
in dialogs are not going to use many colors, thats most.

When I use a bmp I save it in both formats and use the
smaller of the two, simple as that! If your trying to cut back
size in your app why would you add additional size by adding
some other compression scheme just to place a pic in a
dialog. Now if your discussing a pic viewer or pic editor thats
something entirely different.
Posted on 2001-08-28 10:42:32 by bcraven
Bill, I said if you were going to use a *lot* of pictures you could
use another compression method. And probably this would have to
be a lot, so the advantage of reduction of picture size isn't nullified
by the extra size of a decompressor. But in the commercial app I'm
working on, I think a jpeg decompressor would help a *lot*, since
we're using a sorta skinned interface (not my idea, but the customers
want is :/ ).
Posted on 2001-08-28 10:46:56 by f0dder

Sorry if I misunderstood, best of luck on the commercial app!
Posted on 2001-08-28 11:08:30 by bcraven
You can use COM to access BMP, JPG, GIF, WMF, and ICO formats with the IPicture interface.

Ernest Murphy has a great article along with sample code to do this.
Posted on 2001-08-30 18:12:18 by dl?