Code Comments
Programming Forum and web based access to our favorite programming groups.I'm trying to put text in an existing image. I got this working with the
following code.
I need this because I am making a FAQ and want certain screenshots with auto
filled in names
I tried putting this lines in a working script though I get carbage on my
screen now.. I think this is a result of a conflict between content-type:
HTML/Text\n\n en binmode ?!?
How can I overcome this ?!?
#!/usr/bin/perl -w
use GD;
$im = newFromPng GD::Image("../../images/frontpage/circle.png");
$black = $im->colorAllocate(0,0,0);
$im->string(gdSmallFont,2,10,"Testing",$black);
binmode STDOUT;
print $im->png;
Post Follow-up to this messageDaniel van den Oord wrote: > carbage... I think this is a result of a conflict between content-type: > HTML/Text\n\n en binmode ?!? You're supposed to output "Content-type: image/png\n\n" before setting STDOUT to binmode. -Joe
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.