Board index » delphi » Creating a image browser. 256 color problems

Creating a image browser. 256 color problems

Hi!

I was wondering if anyone could help me with the following problem:

I am creating a image browser that displays images from 1 to x. The images
are JPG images with a high color resolution (24 bit). The browser works
like a grid with an image-component in each cell. The browser works fine on
systems with a high color resolution, but when it is run on a system with
256 color, the palette is crashed, and just one of the pictures(the last
loaded) is displayed fine.

I do believe I must do something with the palette to make the
image-components communicate, and use the same palette.

Does anyone know/have a little piece of source that explains me how to do
this?

Thanks!

-J?rgen

 

Re:Creating a image browser. 256 color problems


Quote
J=F8rgen M=F8lbach wrote:
> =
> Hi!
> =
> I was wondering if anyone could help me with the following problem:
> =
> I am creating a image browser that displays images from 1 to x. The ima=
ges
> are JPG images with a high color resolution (24 bit). The browser works=
> like a grid with an image-component in each cell. The browser works fin=
e on
> systems with a high color resolution, but when it is run on a system wi=
th
> 256 color, the palette is crashed, and just one of the pictures(the las=
t
> loaded) is displayed fine.
> =
> I do believe I must do something with the palette to make the
> image-components communicate, and use the same palette.
> =
> Does anyone know/have a little piece of source that explains me how to =
do
> this?
> =
> Thanks!
> =
> -J=F8rgen

Hi,
Pegasus sells a very high speed 16 or 32 bit graphics VCL.  Our jpeg
speed is untouchable, and includes the color palette handling you
request, automatically, or you can pass in a universal palette; and
includes features like zoom, print, etc. =

Free trial versions VCL's below:

32bit trial VCL: ftp://pegasusimaging.com/pub/IMAGN/INSTW33D.EXE (Ver 3)
(ver 3, $449 / ver 2, $299)
For info or to order our tools hit our site or drop me some email.
Good luck,
jack
-- =

*********************************************************************
Jack Berlin -  http://www.pegasusimaging.com/  -  813-875-7575 x303 =

 jber...@jpg.com  - Pegasus Imaging Corp -  BETTER DIGITAL IMAGING!
*********************************************************************

Re:Creating a image browser. 256 color problems


This is a multi-part message in MIME format.
--------------CD289918C6DF0F558261AA77
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Quote
J?rgen M?lbach wrote:

> Hi!

> I was wondering if anyone could help me with the following problem:

> I am creating a image browser that displays images from 1 to x. The images
> are JPG images with a high color resolution (24 bit). The browser works
> like a grid with an image-component in each cell. The browser works fine on
> systems with a high color resolution, but when it is run on a system with
> 256 color, the palette is crashed, and just one of the pictures(the last
> loaded) is displayed fine.

> I do believe I must do something with the palette to make the
> image-components communicate, and use the same palette.

> Does anyone know/have a little piece of source that explains me how to do
> this?

> Thanks!

> -J?rgen

Jorgen,

You've got to understand that, unless you tell it to behave differently,
in 256-color mode, Windows assumes that the specific 256 color palette
of the most recent image object is the master palette for the system.
Windows does allow you to allow for the other palettes to have somewhat
more effect in the inactive windows/image objects, *AND*, more
importantly, you *can* optimize the main form's master palette prior to
displaying all the images.  However, since your viewer's images are
going to change as you select different images, you'd be better off with
the first technique-the second one will massively slow down the recalc
and display time every time you add or change an image.

MSJ had a series of articles on this topic earlier this year that cover
the system palette and how to compensate in the inactive windows for a
changed active window palette.  Check out the MSN website.

Derek
--------------CD289918C6DF0F558261AA77
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Derek Benner
Content-Disposition: attachment; filename="vcard.vcf"

begin:          vcard
fn:             Derek Benner
n:              Benner;Derek
adr:            PO Box 2248;;;Citrus Heights;CA;95611;USA
email;internet: dben...@pacbell.net
title:          Author
tel;home:       (916) 334-9358
note:           Specialization is for insects!
x-mozilla-cpt:  ;0
x-mozilla-html: TRUE
end:            vcard

--------------CD289918C6DF0F558261AA77--

Other Threads