Ashley Sheridan schreef:
Hence me saying "in the way you are asking" I know GD can scale images
(I've done that myself on more than one occassion), but not images that
are intended for print as opposed to screen viewing, as this appears to be.
I can't see how imagemagick helps here, it's a bitmap manipulator just like
GD. so it's either use something that generates vector based output (and let
the printersubsytem handle the conversion) or generate massive bitmaps and
print them at a very high DPI.
As for quality, I've found that GD offers comparable quality images to
ImageMagik, and in better time more often than not. The main advantage
ImageMagik has is with functionality; quite simply, it can do much more
than GD and GD2.
I'll take your word on that, I've never played with imagemagick, having found
GD to produce quality good enough for my needs.
Ash
www.ashleysheridan.co.uk
------------------------------------------------------------------------
Onderwerp:
Re: [PHP] Image Generation
Van:
Jochem Maas <[EMAIL PROTECTED]>
Datum:
Wed, 20 Aug 2008 11:06:14 +0200
Aan:
[EMAIL PROTECTED]
Aan:
[EMAIL PROTECTED]
CC:
Alex Chamberlain <[EMAIL PROTECTED]>, PHP General list
<php-general@lists.php.net>
Return-path:
<[EMAIL PROTECTED]>
Envelope-to:
[EMAIL PROTECTED]
Delivery-date:
Wed, 20 Aug 2008 10:06:54 +0100
Received:
from [216.92.131.4] (port=19732 helo=lists.php.net) by
zencphosting11.zen.co.uk with esmtp (Exim 4.68) (envelope-from
<[EMAIL PROTECTED]>) id
1KVjeX-0001J1-OZ for [EMAIL PROTECTED]; Wed, 20 Aug 2008 10:06:54
+0100
X-Host-Fingerprint:
216.92.131.4 lists.php.net
Received:
from [216.92.131.4] ([216.92.131.4:19612] helo=lists.php.net) by
pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id
54/0E-51571-CAEDBA84 for <[EMAIL PROTECTED]>; Wed, 20 Aug 2008
05:06:52 -0400
Received:
(qmail 38571 invoked by uid 1010); 20 Aug 2008 09:06:34 -0000
Mailing-List:
contact [EMAIL PROTECTED]; run by ezmlm
Precedence:
bulk
list-help:
<mailto:[EMAIL PROTECTED]>
list-unsubscribe:
<mailto:[EMAIL PROTECTED]>
list-post:
<mailto:php-general@lists.php.net>
Delivered-To:
mailing list php-general@lists.php.net
Received:
(qmail 38564 invoked from network); 20 Aug 2008 09:06:34 -0000
Authentication-Results:
pb1.pair.com [EMAIL PROTECTED]; sender-id=unknown
Authentication-Results:
pb1.pair.com [EMAIL PROTECTED]; spf=permerror;
sender-id=unknown
Received-SPF:
error (pb1.pair.com: domain iamjochem.com from 194.109.193.121 cause and
error)
X-PHP-List-Original-Sender:
[EMAIL PROTECTED]
X-Host-Fingerprint:
194.109.193.121 mx1.moulin.nl Linux 2.6
X-Virus-Scanned:
amavisd-new at moulin.nl
Bericht-ID:
<[EMAIL PROTECTED]>
User-agent:
Thunderbird 2.0.0.16 (Macintosh/20080707)
MIME-versie:
1.0
Referenties:
<[EMAIL PROTECTED]>
<[EMAIL PROTECTED]>
In-Reply-To:
<[EMAIL PROTECTED]>
X-Enigmail-Version:
0.95.6
Content-Type:
text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding:
base64
Ashley Sheridan schreef:
I don't think GD has a built-in function to scale an image the way you
are asking,
of course you can scale images with GD, but everything works in pixels,
ImageMagick is no different ... there is no such thing as millimeters
when it
comes to bitmap images, you can specify an output resolution when
printing but
that has no direct bearing on the image file itself.
Alex will have to figure out the bounding box ratios of the dimensions
given in
mm and transpose that into the 300x150 pixel image he's going to use as
a canvas,
the math is not that hard (can't be if I can manage it!) and although it
won't
be a perfect at all times he did mention it's a representation.
If Alex requires pixel perfect representation of print output in a file
then he
is going to have to resort to some kind of vector based image
representation
(e.g. Adobe Illustrator) but scripting that with php is possibly going
to be very
tricky, either using a COM object or shelling out to something like
AppleScript
(which I know you can use to do some really crazy Illustrator scripting
with)
and to do it on a pixel by pixel basis from within a function is going
to be a very time consuming and memory costly process. Have you
thought about using ImageMagik to do this? I know that you can exec()
out to this from within Windows and Linux, and ImageMagik is free to
use (as far as I'm aware) so it could be just what you need.
Ash
www.ashleysheridan.co.uk
------------------------------------------------------------------------
Onderwerp:
[PHP] Image Generation
Van:
"Alex Chamberlain" <[EMAIL PROTECTED]>
Datum:
Wed, 20 Aug 2008 08:29:50 +0100
Aan:
"PHP General list" <php-general@lists.php.net>
Aan:
"PHP General list" <php-general@lists.php.net>
Return-path:
<[EMAIL PROTECTED]>
Envelope-to:
[EMAIL PROTECTED]
Delivery-date:
Wed, 20 Aug 2008 08:30:52 +0100
Received:
from [216.92.131.4] (port=26599 helo=lists.php.net) by
zencphosting11.zen.co.uk with esmtp (Exim 4.68) (envelope-from
<[EMAIL PROTECTED]>) id
1KVi9b-0007aA-Qe for [EMAIL PROTECTED]; Wed, 20 Aug 2008
08:30:51 +0100
X-Host-Fingerprint:
216.92.131.4 lists.php.net
Received:
from [216.92.131.4] ([216.92.131.4:26502] helo=lists.php.net) by
pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id
B7/47-51571-A28CBA84 for <[EMAIL PROTECTED]>; Wed, 20 Aug 2008
03:30:50 -0400
Received:
(qmail 5047 invoked by uid 1010); 20 Aug 2008 07:30:37 -0000
Mailing-List:
contact [EMAIL PROTECTED]; run by ezmlm
Precedence:
bulk
list-help:
<mailto:[EMAIL PROTECTED]>
list-unsubscribe:
<mailto:[EMAIL PROTECTED]>
list-post:
<mailto:php-general@lists.php.net>
Delivered-To:
mailing list php-general@lists.php.net
Received:
(qmail 5040 invoked from network); 20 Aug 2008 07:30:37 -0000
Authentication-Results:
pb1.pair.com [EMAIL PROTECTED]; spf=permerror;
sender-id=unknown
Authentication-Results:
pb1.pair.com [EMAIL PROTECTED]; sender-id=unknown
Received-SPF:
error (pb1.pair.com: domain alexchamberlain.co.uk from 79.170.40.18
cause and error)
X-PHP-List-Original-Sender:
[EMAIL PROTECTED]
X-Host-Fingerprint:
79.170.40.18 mail18.extendcp.co.uk Linux 2.5 (sometimes 2.4) (4)
Bericht-ID:
<[EMAIL PROTECTED]>
MIME-versie:
1.0
Content-Type:
text/plain; charset="windows-1250"
X-Mailer:
Microsoft Office Outlook 12.0
Thread-Index:
AckCloefPR8PGF4zQNGV6eViXsKrxQ==
Content-Language:
en-gb
Content-Transfer-Encoding:
base64
Hi,
I need to generate an online proof for vinyl lettering. Customers specify
the text, font, colour, maximum frame size (mm) (ie the width and
height it
must fit into), and whether or not they want to keep aspect ratio (ie not
distort the lettering).
I want to represent all this on a single image. So it would display a
border
with their width and height on, and inside this would be the text in the
appropriate colour and font – if they decide to keep aspect ratio the
text
would not be distorted. If they do not, it would be. The image would
always
be 300px wide by 150px high (these would need to be constants that I
could
change from time to time).
I’ve got a very basic proof working using a GD wrapper, but I don’t
think GD
is powerful enough to do it all, nor do I recon my programming skills
are up
for it. Has anybody got any advice on how to tackle this, even if it
is just
bits of the problem??
Thanks,
Alex Chamberlain
No virus found in this outgoing message. Scanned by AVG Free 8.0
Checked by AVG - http://www.avg.com Version: 8.0.138 / Virus Database:
270.6.6/1621 - Release Date: 19/08/2008
18:53
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php