[reportlab-users] canvas background image - whites are not white
Roger Sillito
w.r.sillito at ncl.ac.uk
Fri Aug 26 07:33:17 EDT 2005
Hi,
I have created a function which is to be passed into the onPage parameter of
a PageTemplate, which draws the background layout of my document. Using
this, I want to setup a background graphic to appear on each page as
follows:
graphic =
"/export/home/data/cluster/uploads/myprofile/Images/PP_bg_graphic.gif"
scale = 0.2
h = 1556
w = 1639
mask = [254,255, 254,255, 254,255]
canvas.drawImage(graphic, 14.4, 108, width=w*scale, height=h*scale,
mask=mask)
The image itself is a 4 colour gif, with a white background. I want the
background to blend seamlessly into the white canvas. This seems to work
fine when I have the image on screen, however when I print the PDF the parts
of the image which should be white appear as a light grey. I have tried
using a transparent gif, this also makes no difference.
I have tried this with a JPEG, where again I get the same problem when
printing.
I am using the following versions:
PIL version 1.1.4
ReportLab version 1.27
Python 2.3.3 (#1, Feb 5 2005, 16:30:27) [GCC 3.3.3 (SuSE Linux)] on
linux2
If anyone could offer me any advice as to where the problem may lie it would
be greatly appreciated!
cheers,
Roger.
_____________________________________________________________
Roger Sillito (Web Development Officer - MyProfiles)
School of Medical Education Development (FMSC)
The Medical School, Framlington Place 0191 246 4547
University of Newcastle upon Tyne w.r.sillito at ncl.ac.uk
NE2 4HH http://www.myprofiles.ncl.ac.uk
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
More information about the reportlab-users
mailing list