librelist archives

« back to archive

Re: [wand] RE: problem running code.

Re: [wand] RE: problem running code.

From:
Mike Chung
Date:
2012-12-11 @ 18:26
Hmm I have set this to truebut when I do this
 with imgcopy.convert("PNG8") as myConverted:                        
myConverted.alpha_channel = True                        #print 
myConverted.format                        
myConverted.save(filename=nameOfNewFiles+str(i)+str(j)+".png")
It appears that the final file saved when on my mac checking the file info
says its sRGB and the image space is RGB so I donno why the alpha channel 
is not being set.am I using this incorrectly?
Date: Tue, 11 Dec 2012 23:30:16 +0900
From: minhee@dahlia.kr
Subject: Re: [wand] RE: problem running example code.
To: wand@librelist.com


                
                    Image.alpha_channel [1] isn’t a method but a property,
so change the code to like this:
                
  img.alpha_channel = True
[1] http://dahlia.kr/wand/wand/image.html#wand.image.Image.alpha_channel
                
                 
                On Tuesday, December 11, 2012 at 5:30 PM, Mike Chung wrote:
                
                    



Has anyone had this error before I did a google search and the stack 
overflow answer did not apply to me.since I call this in a part of the 
code that contains just the image and nothing else.
def Test():    with Image(filename="Dead.jpg") as img:        
img.alpha_channel(True)Test()


img.alpha_channel(True)TypeError: 'long' object is not callable
I am using version 0.30