Setting Background to other colours causes them to be
used. Since EmptyBitmap gives you a random chunk of
memory, it has to be cleared first.
Set the mask to be the colour you use to clear the image.
I cannot get that to work. I can make it have a black
background with my image, a white background with my
image, or a transparent background with no image. What I
want is to create a bitmap (eg 100x100) draw a smaller bitmap
into that, and then save the result as a PNG. Here was my
code taking in the above suggestion trying to work:
Setting Background to other colours causes them to be
used. Since EmptyBitmap gives you a random chunk of
memory, it has to be cleared first.
Set the mask to be the colour you use to clear the image.
I cannot get that to work. I can make it have a black
background with my image, a white background with my
image, or a transparent background with no image. What I
want is to create a bitmap (eg 100x100) draw a smaller bitmap
into that, and then save the result as a PNG. Here was my
code taking in the above suggestion trying to work:
Thanks, that did the trick. Since some of my images had black in them,
I used img.FindFirstUnusedColour and used that as the background and
mask colour.
Thanks, that did the trick. Since some of my images had black in them,
I used img.FindFirstUnusedColour and used that as the background and
mask colour.
That's what it's there for.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!