[reportlab-users] painting an image over another

Robin Becker robin at reportlab.com
Fri Feb 4 08:19:26 EST 2005


Michele Simionato wrote:
> On Fri, 04 Feb 2005 09:00:34 +0000, Robin Becker <robin at reportlab.com> wrote:
> 
......
> 
> As you may have guessed, my experience with image manipulation is zero.
> Is it possible to do something akin to the technique used in cartoons, superpose
> images drawn on transparent sheets? In my case the white color should
> be regarded as transparent . FYI, I have ".jpg" images but I could
> convert them into ".gif" if needed.

I suspect it's the jpeg bit that causes the problem. PDF uses jpegs natively and 
we've allowed two ways into the document one of which doesn't do transparency.
I assume that JPEG can be fixed, but not today.

> P.S.cropping images would not work in my case, but just for my personal
> information, is that a way to automatically extract the non-blank part of
> an image? I mean in my "Image 1" example, extracting the rectangle
> with "###" as a subimage of the entire picture *without* giving it the
> coordinates, i.e. the system should figure out automagically the position
> and size of the largest non-blank rectangle in the picture.
.... we don't provide an image analyzer, but it could be done in PIL with some 
way to check colours and assemble paths etc. The clipping path would probably be 
very complex.
-- 
Robin Becker


More information about the reportlab-users mailing list