PIL: Transparent PNGs and im.paste: ValueError: bad transparency mask

Discussion in 'Python' started by Durand, Jul 10, 2008.

  1. Durand

    Durand Guest

    Hi!

    I'm trying to paste a png with a transparent layer into an image using "image.paste(tesla,(20,10), tesla)" but I'm getting this error:

    ValueError: bad transparency mask

    I have used im.paste(image,box,image) sucessfully before to paste an image with transparency, however, it doesn't seem to work for this particular image. How would I change the image so that it doesn't give me this error?

    The image is http://img293.imageshack.us/img293/1434/teslahv5.png

    Thanks in advance!
     
    Durand, Jul 10, 2008
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tiewknvc9

    transparent pngs to a movie???

    tiewknvc9, May 9, 2006, in forum: Java
    Replies:
    4
    Views:
    963
    tiewknvc9
    May 11, 2006
  2. Marek

    PIL and transparency in IE

    Marek, Jun 26, 2003, in forum: Python
    Replies:
    0
    Views:
    1,196
    Marek
    Jun 26, 2003
  3. jean-Baptiste Cazier

    Transparency with PIL and paste ?

    jean-Baptiste Cazier, Jul 23, 2003, in forum: Python
    Replies:
    0
    Views:
    922
    jean-Baptiste Cazier
    Jul 23, 2003
  4. Caleb Hattingh
    Replies:
    2
    Views:
    2,578
    Caleb Hattingh
    Dec 1, 2004
  5. Durand
    Replies:
    1
    Views:
    831
    Ken Starks
    Jul 11, 2008
  6. rantingrick
    Replies:
    44
    Views:
    1,894
    Peter Pearson
    Jul 13, 2010
  7. Marcin Tyman

    Conversion mask in hex to bit mask

    Marcin Tyman, May 6, 2008, in forum: Ruby
    Replies:
    4
    Views:
    1,212
    Robert Klemme
    May 6, 2008
  8. 187
    Replies:
    2
    Views:
    868
    Bart Lateur
    Jul 29, 2004
Loading...