PHP Doku:: Ermittelt Bilddaten [veraltet] - function.pdf-open-image.html

Verlauf / Chronik / History: (24) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzNon-Text MIME-AusgabenPDFPDF FunktionenPDF_open_image

Ein Service von Reinhard Neidl - Webprogrammierung.

PDF Funktionen

<<PDF_open_image_file

PDF_open_jpeg>>

PDF_open_image

(PHP 4 >= 4.0.5, PECL pdflib >= 1.0.0)

PDF_open_imageErmittelt Bilddaten [veraltet]

Beschreibung

int PDF_open_image ( resource $p , string $imagetype , string $source , string $data , int $length , int $width , int $height , int $components , int $bpc , string $params )

Bezieht Bilddaten aus verschiedenen Datenquellen.

Diese Funktion ist seit PDFlib Version 5 veraltet, verwenden Sie stattdessen virtuelle Dateien und die Funktion PDF_load_image().


6 BenutzerBeiträge:
- Beiträge aktualisieren...
K
24.04.2003 2:36
Ok, according to the PDFlib docs,

bpc - only for imagetype raw (required in this case).  The number of bits per component.  Must be 1,2,4 or 8

components - only for imagetype raw (required in this case). The number of image components.  Must be 1, 3 or 4.

Read the docs (page 171) for a full list of params I assume are used for the last argument.
tfraser at jeffsys dot net
5.03.2003 22:41
If you want to open a TIFF image, you have to use pdf_open_image_file().  If you want to open a TIFF image from memory, you'll have to wait until version 5.  I gleaned this from the PDFlib folks themselves:

> from rp@pdflib.com
The only way to open TIFF with PDFlib 4 is to open it from
file. But in PDFlib 5 (http://www.pdflib.com/beta/) we add
a virtual file system, so you can easy open a file from
memory.
lindsayNOSPAM at NOSPAMdingos dot net
20.12.2002 3:42
if you ahve pdflib v4 or higher, you may also use TIFF images, by specifying 'tiff'  in the image type.

checked the pdflib documentation, tried it out, it works.
nils at deviant dot no
16.01.2002 14:00
a quick example:

$pdfimage = pdf_open_image_file($pdf, "jpeg", "test.jpg");
pdf_place_image($pdf, $pdfimage, 10, 10, 0.6);

...
pdf_close etc..
bob at nijman dot de
2.08.2001 17:05
mark troyan wrote:

> Can you use the PDF_open_image to handle gif's? How?

and Thomas Merz answered:

Nope. Unfortunately PDF supports _nearly_ everything needed
to decode GIFs internally (as with JPEG), but some minor
feature is missing. It seems Adobe also realized this --
they added the missing link in PostScript 3, so chances are
it will appear in PDF 1.4 or something...

Since the PDF_open_image() interface is meant for dumping
the image data to the PDF without any further interpretation,
it can't support GIF.

Found at:
http://groups.yahoo.com/group/pdflib/message/301
bob at nijman dot de
2.08.2001 14:54
For good and easy to understand examples on images in PDFs go to

http://www.dynamicwebpages.de/50.tutorials.php?dwp_tutorialID=13

(It's in german, but the sources alone will be a great help and inspiration :-))



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)