[Newbie] How to superimpose 2 GIF image ...

*This message was transferred with a trial version of CommuniGate(tm) Pro*
Hello,
i tray to simulate an analogic clock. (I found a nice example in and oreilly book)

I have do some tray with Tkinter, but i will use a nicer image (with a GIF image) ...
i make a tray with PIL, but the rotate function give strange image !! (with black corners)

than i will tray with wx ... but i don't no how to superimpose 2 GIF image (with some transparency part, and where one image have be rotated) ;-((

I make many google search but i don't found the informations I'm looking for. I just found some ideas, but I'm really not sure of the better way to go on :

wxDC::Blit
or
wxImage.Paste()
or
dc.DrawBitmap

any suggestion is welcome.

Tanks.

Gerard

- use the dc.DrawBitmap to draw the image on a memoryDC, when done drawing blit the result to the paintDC.
- use PNGs rather than GIFS, they support alpha :wink:
- use something like img.SetAlpha(i,j, 255) for i,j in the pixels outside the zone of interest to get rid of the black corners (img is a wx.Image)
- take a look at Andrea's SpeedMeter http://xoomer.virgilio.it/infinity77/eng/freeware.html#speedmeter

Peter.

···

On Mon, 03 Oct 2005 14:33:17 +0300, gerard <gerard@azurline.com> wrote:

*This message was transferred with a trial version of CommuniGate(tm) Pro*
Hello,
i tray to simulate an analogic clock. (I found a nice example in and oreilly book)

I have do some tray with Tkinter, but i will use a nicer image (with a GIF image) ...
i make a tray with PIL, but the rotate function give strange image !! (with black corners)

than i will tray with wx ... but i don't no how to superimpose 2 GIF image (with some transparency part, and where one image have be rotated) ;-((

I make many google search but i don't found the informations I'm looking for. I just found some ideas, but I'm really not sure of the better way to go on :

wxDC::Blit
or
wxImage.Paste()
or
dc.DrawBitmap

any suggestion is welcome.

Tanks.

Gerard

gerard wrote:

i tray to simulate an analogic clock. (I found a nice example in and oreilly book)

How about:

wx.lib.analogclock

In any case, I'm a little confused as to why you need to superimpose two GIFs? I can see you might want to use an Image as the background, but then you can just draw the parts that move (the hands) in top of the Image with a wx.MemoryDC.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer
                                         
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov