Hey Google, has this been fixed in the new SDK?

On Jul 31 2009, 1:40 pm, Rodrigo Moraes <rodrigo.mor...@gmail.com>
wrote:
> On Jun 3, 8:08 pm, Mick wrote:
>
> > Just tested and it worked on appspot. awesome! but is there a
> > workaround to get it work correctly on dev?
>
> Hi Mick.
> I had this same problem today (no transparency in png's when using
> composite()), and got a quick fix. If you want to pach the SDK until
> it is fixed, here's how.
>
> in google.appengine.api.images.images_stub.py, on lines 114-116,
> you'll find:
>
>       alpha = options.opacity() * 255
>       mask = Image.new("L", source.size, alpha)
>       canvas.paste(source, (x_offset, y_offset), mask)
>
> replace it with...
>
>       if source.mode == 'RGBA':
>           canvas.paste(source, (x_offset, y_offset), source)
>       else:
>           alpha = options.opacity() * 255
>           mask = Image.new("L", source.size, alpha)
>           canvas.paste(source, (x_offset, y_offset), mask)
>
> that's it.
> -- rodrigo

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to