When running the application on a display with more than 256 colours, it
looks fine.
When running the application on a 256 colour display, the
wxStaticBitmap's colours are all messed up.
When viewing the image file directly using a browser or graphics package
on a 256 colour display, it again looks fine, which is what makes me
think this is a wxPython thing rather than a problem with the image.
Could anyone tell me why this is happening please?
Thanks...
JOn.
···
--
Jonathan Stoneman - Programmer - Frontier Internet Services Limited
Tel: 02920 820045 Fax: 02920 820038 http://www.frontier.net.uk
All statements made are subject to Frontier's Terms and Conditions
of Business which are available upon request.
When running the application on a display with more than 256 colours, it
looks fine.
When running the application on a 256 colour display, the
wxStaticBitmap's colours are all messed up.
When viewing the image file directly using a browser or graphics package
on a 256 colour display, it again looks fine, which is what makes me
think this is a wxPython thing rather than a problem with the image.
It's been a *very* long time since I ran a display in 8-bit mode so I am very foggy on the details, but basically you need to remember that each of those 256 color slots can be chosen from a palette of 16 million colours so there may be a very wide discrepancy between the palette of the image and the colours currently in use in the system. Many of the 256 colours available on the system may have already been allocated by other running apps. There probably is a way to install a new palette for your app giving you 240 empty color slots (256 - the 16 reserved by Windows) but I don't think wxWindows provides a way to do that since it is not a very cross platform concept and since 99.9% of the machines these days runs the display at > 8-bit. There is a wxPalette class and the wxBitmap class has SetPalette and GetPalette methods, but I've never used them to know what they do or how they do it.
Sorry.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
Upon closer inspection, wxBitmap does not seem to have a SetPalette
method under wxPython, though it is definitely there under wxWindows.
Could anyone tell me why this is please?
Thanks.. Jon.
···
On Fri, 2003-08-15 at 09:35, Jonathan Stoneman wrote:
> There is a wxPalette class and
> the wxBitmap class has SetPalette and GetPalette methods, but I've never
> used them to know what they do or how they do it.
I shall have a look into these, thanks for the pointer.
--
Jonathan Stoneman - Programmer - Frontier Internet Services Limited
Tel: 02920 820045 Fax: 02920 820038 http://www.frontier.net.uk
All statements made are subject to Frontier's Terms and Conditions
of Business which are available upon request.