two images objects on the same form

two images objects on the same form

Post by john radcliff » Sun, 06 Dec 1998 04:00:00


I am trying to use image1 for a background, and then load a new image (a
logo) on top

I placed image1, and image2 on the form, and then load the pictures at
runtime, but one of the images is all dithered.

they look fine in design mode, but when I run the app, one gets funny.

How can I fix this

thanx



 
 
 

two images objects on the same form

Post by Kurt Barthelmess (Tea » Mon, 07 Dec 1998 04:00:00


John -

If the images use different palettes, and you are running in 256 color
mode, that may be the problem. Win 3.x in particular can not handle
that situation at all. The simplest solution is to have both images
use the same palette (with no more than 236 specific colors.)

Good luck.

Kurt

 
 
 

two images objects on the same form

Post by Kevn Lambso » Tue, 08 Dec 1998 04:00:00


Another alternative is to use RGB (24 bit) images. More system memory is
required, but palette issues are avoided completely.

 
 
 

two images objects on the same form

Post by Earl F. Glyn » Wed, 09 Dec 1998 04:00:00



>I am trying to use image1 for a background, and then load a new image (a
>logo) on top

>I placed image1, and image2 on the form, and then load the pictures at
>runtime, but one of the images is all dithered.

>they look fine in design mode, but when I run the app, one gets funny.

>How can I fix this

The easiest solution is to use high color or true color graphics mode, but if you must use 256 color mode, take a look at the
"ShowDemoMany" Lab Report that shows how to compute an "optimal" palette of 236 colors from a set of 24-bit color images.  This
optimal palette is just for display purposes.

www.efg2.com/lab/Graphics/Colors/ShowDemoMany.htm

Note that Windows normally reserves 20 colors in 256 color mode.  Your conclusion from all this should be that it is pure luck that
this heuristic process usually works -- there is no guarantee.

The "ShowDemoOne" Lab Report is a little simpler to follow and works with only a single image.
www.efg2.com/lab/Graphics/Colors/ShowDemoOne.htm

efg
_________________________________
efg's Computer Lab:       www.efg2.com/lab
Delphi Books:  www.efg2.com/lab/TechBooks/Delphi.htm


Overland Park, KS  USA