PDF_open_memory_image

(PHP 3>= 3.0.10, PHP 4 >= 4.0b2)

PDF_open_memory_image -- Opens an image created with PHP's image functions

Description

int PDF_open_memory_image (int pdf object, int image)

The PDF_open_memory_image() function takes an image created with the PHP's image functions and makes it available for the pdf object. The function returns a pdf image identifier.

Example 1. Including a memory image


<?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);
?>
     

See also PDF_close_image(), PDF_place_image().