I would like to cut an image into several parts, so I tried to use
wx.Image.Resize method. However, this method is not working as I would
expect. I tried to cut a smaller image from the center of a bigger
one, so I used something like:
I tried negative coordinates, too, but the result is still weird and I
can't understand how Resize works. Could anyone explain it to me? Or
is there any better way to split up an image?
Resize does exactly what it says, it resizes the image. To pull out a copy of the portion of an image you want to use the GetSubImage method.
···
On 10/2/11 1:01 AM, annakrat wrote:
I would like to cut an image into several parts, so I tried to use
wx.Image.Resize method. However, this method is not working as I would
expect. I tried to cut a smaller image from the center of a bigger
one, so I used something like:
I tried negative coordinates, too, but the result is still weird and I
can't understand how Resize works. Could anyone explain it to me? Or
is there any better way to split up an image?
Thanks very much to both of you. I'm sorry I completely overlooked the
GetSubImage method.
Anna
···
On Oct 2, 9:39 pm, Robin Dunn <ro...@alldunn.com> wrote:
On 10/2/11 1:01 AM, annakrat wrote:
> I would like to cut an image into several parts, so I tried to use
> wx.Image.Resize method. However, this method is not working as I would
> expect. I tried to cut a smaller image from the center of a bigger
> one, so I used something like:
> I tried negative coordinates, too, but the result is still weird and I
> can't understand how Resize works. Could anyone explain it to me? Or
> is there any better way to split up an image?
Resize does exactly what it says, it resizes the image. To pull out a
copy of the portion of an image you want to use the GetSubImage method.
--
Robin Dunn
Software Craftsmanhttp://wxPython.org