Board index » delphi » What the &*^%(&^$@$#@ is wrong with Image????

What the &*^%(&^$@$#@ is wrong with Image????

What is wrong with the image component?  It won't display pictures
right.  I have perfectly normal bitmaps that look fine in every viewer
I have including Windows PaintBrush and then I try loading it into the
image component and presto...it is all screwed up.  It is like it has
its own unique palette.  This is especially true with 256-16Mill color
bmps.  But even when I reduce this once beautiful pictures down to 16
colors and are ugly in that.  I check in paintbrush...looks ok for 16
colors load it into Image...&%#&*^%#&*^%# (frustation sets in)  Please
Help

Eric Miles
mil...@usafe14.ramstein.af.mil
.............................................
My opinions and comments are my own and ONLY
my own and reflect in no way the Air Force's.
.............................................

 

Re:What the &*^%(&^$@$#@ is wrong with Image????


Quote
mil...@usafe14.ramstein.af.mil (Eric Miles) wrote:
>What is wrong with the image component?  It won't display pictures
>right.  I have perfectly normal bitmaps that look fine in every viewer
>I have including Windows PaintBrush and then I try loading it into the
>image component and presto...it is all screwed up.  It is like it has
>its own unique palette.  This is especially true with 256-16Mill color
>bmps.  But even when I reduce this once beautiful pictures down to 16
>colors and are ugly in that.  I check in paintbrush...looks ok for 16
>colors load it into Image...&%#&*^%#&*^%# (frustation sets in)  Please
>Help

        It's not very good at images with more colors than the current
video driver supports, but for, say, 256-color images at 256 colors it
works fine for me. (Are you trying several images at once with different
color tables?)

--
David Ullrich
Don't you guys find it tedious typing the same thing
after your signature each time you post something?
I know I do, but when in Rome...

Re:What the &*^%(&^$@$#@ is wrong with Image????


Quote
Eric Miles wrote:

> What is wrong with the image component?  It won't display pictures
> right.  I have perfectly normal bitmaps that look fine in every viewer
> I have including Windows PaintBrush and then I try loading it into the
> image component and presto...it is all screwed up.  It is like it has
> its own unique palette.  This is especially true with 256-16Mill color
> bmps.  But even when I reduce this once beautiful pictures down to 16
> colors and are ugly in that.  I check in paintbrush...looks ok for 16
> colors load it into Image...&%#&*^%#&*^%# (frustation sets in)  Please
> Help

> Eric Miles
> mil...@usafe14.ramstein.af.mil
> .............................................
> My opinions and comments are my own and ONLY
> my own and reflect in no way the Air Force's.
> .............................................

I've found the same problem. However, this could be the answer. Save
your BMP files as RGB encoded and not RLE encoded. I think this will
help.

Cheer,
Andrew McLean
Sydney, Australia

Re:What the &*^%(&^$@$#@ is wrong with Image????


You must be 1000th person to request help on this so far on the list and
still no sign of FAQ or white paper on problem from Borland.

Basically it comes down to needing to realize the palette properly. My
guess is that you are doing a stretchdraw or copyRect (Something which
involves a MemDC behind scenes for the blting).

Solution is ensure that the bitmap palette is realized properly.
Explicitly call SelectPalette and Realize Palette on bitmap and image
DC. Or override the protected getPalette method to point the image
palette at the bitmap palette.

--------------------------------------------------------------------
Phil Scadden, Scadden Research, P.Scad...@gns.cri.nz
55 Buick St, Petone, Lower Hutt
New Zealand, Ph ++64 4 5687190, fax ++64 4 5695016

Other Threads