php-doc-en/reference/pdf/functions/pdf-open-memory-image.xml

65 lines
1.9 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/pdf.xml, last change in rev 1.48 -->
<refentry id="function.pdf-open-memory-image">
<refnamediv>
<refname>pdf_open_memory_image</refname>
<refpurpose>Opens an image created with PHP's image functions</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>pdf_open_memory_image</methodname>
<methodparam><type>resource</type><parameter>pdfdoc</parameter></methodparam>
<methodparam><type>resource</type><parameter>image</parameter></methodparam>
</methodsynopsis>
<para>
The <function>pdf_open_memory_image</function> function takes
an <parameter>image</parameter> created with the PHP's image
functions and makes it available for the pdf resource.
The function returns a pdf image identifier.
<example>
<title>Including a memory image</title>
<programlisting role="php">
<![CDATA[
<?php
$im = imagecreate(100, 100);
$col = imagecolorallocate($im, 80, 45, 190);
imagefill($im, 10, 10, $col);
$pim = pdf_open_memory_image($pdf, $im);
imagedestroy($im);
pdf_place_image($pdf, $pim, 100, 100, 1);
pdf_close_image($pdf, $pim);
?>
]]>
</programlisting>
</example>
</para>
<para>
See also <function>pdf_close_image</function> and
<function>pdf_place_image</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->