← Back to team overview

phatch-dev team mailing list archive

[Bug 487435] Re: Watermark action -- Opacity Value Ignored

 

This hack will work. But the issue will happen again with LA mode
images. The problem is actually because of a PIL bug. It doesn't handle
LA mode properly. We should change get_alpha to use 'RGBA' instead of
'LA'. I didn't have the chance to test this change, but I'm sure it will
fix the bug.

=== modified file 'phatch/lib/imtools.py'
--- phatch/lib/imtools.py	2009-10-06 05:47:25 +0000
+++ phatch/lib/imtools.py	2009-12-14 23:15:38 +0000
@@ -507,7 +507,7 @@
     if has_alpha(image):
         return image.split()[-1]
     if image.mode == 'P' and 'transparency' in image.info:
-        return image.convert('LA').split()[-1]
+        return image.convert('RGBA').split()[-1]
     # No alpha layer, create one.
     return Image.new('L', image.size, 255)

-- 
Watermark action -- Opacity Value Ignored
https://bugs.launchpad.net/bugs/487435
You received this bug notification because you are a member of Phatch
Developers, which is subscribed to Phatch.

Status in Phatch = Photo & Batch!: Confirmed

Bug description:
On version 0.2.4-1 using the Watermark action, the opacity value is ignored.
No matter what value is entered from 0 - 100, opacity doesn't change.







References