[prev in list] [next in list] [prev in thread] [next in thread]
List: pecl-cvs
Subject: [PECL-CVS] cvs: pecl /ps/examples image.php
From: "Uwe Steinmann" <steinm () php ! net>
Date: 2006-04-20 18:50:31
Message-ID: cvssteinm1145559031 () cvsserver
[Download RAW message or body]
steinm Thu Apr 20 18:50:31 2006 UTC
Modified files:
/pecl/ps/examples image.php
Log:
- output width and height of some images
http://cvs.php.net/viewcvs.cgi/pecl/ps/examples/image.php?r1=1.2&r2=1.3&diff_format=u
Index: pecl/ps/examples/image.php
diff -u pecl/ps/examples/image.php:1.2 pecl/ps/examples/image.php:1.3
--- pecl/ps/examples/image.php:1.2 Tue Feb 28 15:54:22 2006
+++ pecl/ps/examples/image.php Thu Apr 20 18:50:31 2006
@@ -50,6 +50,9 @@
begin_example_box($ps, LEFT_BORDER+(EXAMPLE_BOX_WIDTH+30)*($x++), $y, "Indexed \
image without alpha channel", $psfont); $psimage = ps_open_image_file($ps, "png", \
"indexed.png", NULL, 0); ps_place_image($ps, $psimage, 10, 30, 1.0);
+ $buffer = sprintf("%.0f x %.0f pixel", ps_get_value($ps, "imagewidth", $psimage), \
ps_get_value($ps, "imageheight", $psimage)); + ps_setfont($ps, $psfont, 10.0);
+ ps_show_xy($ps, $buffer, EXAMPLE_BOX_WIDTH-10-ps_stringwidth($ps, $buffer, $psfont, \
10), 10); end_example_box($ps);
begin_example_box($ps, LEFT_BORDER+(EXAMPLE_BOX_WIDTH+30)*($x++), $y, "RGB image \
without alpha channel", $psfont); @@ -71,7 +74,10 @@
begin_example_box($ps, LEFT_BORDER+(EXAMPLE_BOX_WIDTH+30)*($x++), $y, "Jpeg gray \
scale image", $psfont); $psimage = ps_open_image_file($ps, "jpeg", "gnu-head.jpg", \
NULL, 0);
- ps_place_image($ps, $psimage, 10, 10, 0.45);
+ ps_place_image($ps, $psimage, 10, 20, 0.45);
+ $buffer = sprintf("%.0f x %.0f pixel", ps_get_value($ps, "imagewidth", $psimage), \
ps_get_value($ps, "imageheight", $psimage)); + ps_setfont($ps, $psfont, 10.0);
+ ps_show_xy($ps, $buffer, EXAMPLE_BOX_WIDTH-10-ps_stringwidth($ps, $buffer, $psfont, \
10), 10); end_example_box($ps);
begin_example_box($ps, LEFT_BORDER+(EXAMPLE_BOX_WIDTH+30)*($x++), $y, "", $psfont);
@@ -118,9 +124,14 @@
begin_example_box($ps, LEFT_BORDER+(EXAMPLE_BOX_WIDTH+30)*($x++), $y, "Jpeg cmyk \
image, rotated", $psfont); $psimage = ps_open_image_file($ps, "jpeg", \
"cne-cmyk.jpg", NULL, 0); + ps_save($ps);
ps_translate($ps, 72, 10);
ps_rotate($ps, 45);
ps_place_image($ps, $psimage, 0, 0, 0.45);
+ ps_restore($ps);
+ $buffer = sprintf("%.0f x %.0f pixel", ps_get_value($ps, "imagewidth", $psimage), \
ps_get_value($ps, "imageheight", $psimage)); + ps_setfont($ps, $psfont, 10.0);
+ ps_show_xy($ps, $buffer, EXAMPLE_BOX_WIDTH-10-ps_stringwidth($ps, $buffer, $psfont, \
10), 10); end_example_box($ps);
begin_example_box($ps, LEFT_BORDER+(EXAMPLE_BOX_WIDTH+30)*($x++), $y, "EPS read \
from memory", $psfont);
--
PECL CVS Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic