wx.ArtProvider quality

Robin Dunn wrote:

Richard Cooper wrote:
> wxPython 2.4.2.4u on python 2.3.2 on WinXP
>
> I'm trying to build my own wxMessageDialog-a-like from scratch using
> wx.Dialog as the base. I'm getting the icon to use in the top left of

the

> dialog using:
>
> wx.ArtProvider_GetBitmap(wx.ART_INFORMATION)
>
> but while this looks similar to the icon on a wx.MessageDialog with
> style=wx.ICON_INFORMATION it is of lower quality (as if it's being

scaled up

> from a smaller size). You can see the difference in the demo by

comparing

> the wxMessageBox demo to the wxArtProvider one.

What size image are you requesting and what size are you drawing it as?
    I've noticed that there is some crud around the edges of the image
content on XP, that is turned into the shadow on the native dialog.
It's probably some alpha blending info that is just getting converted to
a flat mask in wxArtProvider someplace. (Other than that, the rest of
the 32x32 image looks okay.)

I'm requesting the default size (not supplying the size argument) and
drawing without scaling. On second viewing you're probably right that this
is an artefact of the alpha channel being flattened. Do you know at what
point the this happens? Any chance I could get it out of ArtProvider, into
PIL and composite it onto my background colour before loosing the alpha
channel? Otherwise there's not a lot I can do, other than wait for wxPython
2.5, right?

Cheers,

Rich
------- Important Disclaimer follows -------
The information in this email and any attachments is confidential and is
solely for the attention of the addressee. It must not be disclosed to any
third party without our prior authority. Any figures or financial data are
for informational purposes only and are not intended as an offer for
purchase or sale of any security. If you are not the intended recipient,
please telephone +44 (20) 7594 4000 immediately.

Richard Cooper wrote:

I'm requesting the default size (not supplying the size argument) and
drawing without scaling. On second viewing you're probably right that this
is an artefact of the alpha channel being flattened. Do you know at what
point the this happens? Any chance I could get it out of ArtProvider, into
PIL and composite it onto my background colour before loosing the alpha
channel? Otherwise there's not a lot I can do, other than wait for wxPython
2.5, right?

You can find out DLL or whatever that the standard icons are stored and
extract them...

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!