downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

ps_rect> <ps_open_memory_image
Last updated: Fri, 13 Nov 2009

view this page in

ps_place_image

(PECL ps >= 1.1.0)

ps_place_image画像をページに配置する

説明

bool ps_place_image ( resource $psdoc , int $imageid , float $x , float $y , float $scale )

以前に読み込まれている画像をページに配置します。画像の縮尺は変更できます。 画像を回転させる場合は、事前に ps_rotate() で座標系を回転させておきます。

パラメータ

psdoc

ps_new() が返す、postscript ファイルのリソース ID。

imageid

ps_open_image() あるいは ps_open_image_file() が返す、 画像のリソース ID。

x

画像の左下角の x 座標。

y

画像の左下角の y 座標。

scale

画像の拡大率。1.0 を指定すると、解像度は 72 dpi となります。 これにより、各ピクセルが 1 ポイントと等しくなるからです。

返り値

成功した場合に TRUE を、失敗した場合に FALSE を返します。

参考



add a note add a note User Contributed Notes
ps_place_image
php at catchall dot toao dot net
14-Jun-2009 09:05
If you want to make a template with graphics software and place it on your PostScript page, one way to do it is with an eps file.

<?php
$template
= ps_open_image_file($ps, 'eps', 'template.eps');
ps_place_image($ps, $template, 0, 0, 1);
?>

Professional page layout software such as InDesign will typically be able to generate an eps file.  If your software can't, one way to do it (on Windows) is to set up a printer that prints to file with the driver "Lexmark Color 4079 plus PS".  This driver is included with Windows and has the option in its advanced preferences to generate an EPS file.
mike at lasaero dot com
12-May-2007 01:11
To get png images to work I had to save them as indexed colour (128 colours).

ps_rect> <ps_open_memory_image
Last updated: Fri, 13 Nov 2009
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites