[Image-SIG] ImageDraw (text) on RGB and CMYK images

Kevin Cazabon Kevin Cazabon" <kcazabon@rogers.wave.ca
Sun, 4 Apr 1999 23:59:35 -0700


This is a multi-part message in MIME format.

------=_NextPart_000_000D_01BE7EF7.30AE3E20
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Just wondering if there's plans to 'upgrade' the ImageDraw class to work =
properly on images with modes other than '1', 'L', and 'P'?

There's some 'simple' fixes for a few of the functions, which I've been =
using, but it would be much easier to have them built into the module.

For text, I've been using the ImageDraw class to put type on a '1' mode =
(black/white) file the same size as my real image.  I then create an =
Image.new (mode 'RGB') with the background of the color I want my text =
to be (again, the same size as my original), and combine them using the =
text image as an alpha channel/mask.

For lines, I've simply been pasting an Image.new with the correct =
size/shape/color on top of the original, but it only works easily for =
horizontal/vertical lines.  I would have to do the same masking =
procedure as above for diagonal lines.

My big problem with these procedures is that my 'normal' image size is =
between 20-500MB...  and when you start having THREE images in memory =
(image, mask, and colored background), it's not ideal...  even with =
512MB of RAM.

Any other suggestions?

Kevin Cazabon,
kcaza@cymbolic.com
kcazabon@rogers.wave.ca



------=_NextPart_000_000D_01BE7EF7.30AE3E20
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.72.3110.7"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>Just wondering if there's plans to 'upgrade' the =
ImageDraw=20
class to work properly on images with modes other than '1', 'L', and=20
'P'?</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>There's some 'simple' fixes for a few of the =
functions, which=20
I've been using, but it would be much easier to have them built into the =

module.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>For text, I've been using the ImageDraw class to put =
type on a=20
'1' mode (black/white) file the same size as my real image.&nbsp; I then =
create=20
an Image.new (mode 'RGB') with the background of the color I want my =
text to be=20
(again, the same size as my original), and combine them using the text =
image as=20
an alpha channel/mask.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>For lines, I've simply been pasting an Image.new =
with the=20
correct size/shape/color on top of the original, but it only works =
easily for=20
horizontal/vertical lines.&nbsp; I would have to do the same masking =
procedure=20
as above for diagonal lines.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>My big problem with these procedures is that my =
'normal' image=20
size is between 20-500MB...&nbsp; and when you start having THREE images =
in=20
memory (image, mask, and colored background), it's not ideal...&nbsp; =
even with=20
512MB of RAM.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Any other suggestions?</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Kevin Cazabon,</FONT></DIV>
<DIV><FONT size=3D2><A=20
href=3D"mailto:kcaza@cymbolic.com">kcaza@cymbolic.com</A></FONT></DIV>
<DIV><FONT size=3D2><A=20
href=3D"mailto:kcazabon@rogers.wave.ca">kcazabon@rogers.wave.ca</A></FONT=
></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_000D_01BE7EF7.30AE3E20--