php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20785 ImageCreateTrueColor, ImageCreateFromJPEG +pdflib fails - cannot create images
Submitted: 2002-12-03 05:26 UTC Modified: 2002-12-03 13:26 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: tb at scarptor dot net Assigned:
Status: Closed Package: PDF related
PHP Version: 4.2.3, 4.4.0-dev OS: Linux
Private report: No CVE-ID: None
 [2002-12-03 05:26 UTC] tb at scarptor dot net
As reported at http://www.php.net/manual/en/function.pdf-open-memory-image.php
ImageCreateTrueColor and others does not work correctly when using
pdflib > 4.0.x and PHP > 4.2.x and reading the image from memory (reading from
file seems to work though).

Excerpt from forum and configuration information below.

WORKS:
$im = ImageCreate(100, 100);
$pim = pdf_open_memory_image($pdf, $im);

DOES NOT WORK:
$im = ImageCreateTrueColor(100, 100);
$pim = pdf_open_memory_image($pdf, $im);

DOES NOT WORK:
$im = ImageCreateFromJPEG("file.jpg");
$pim = pdf_open_memory_image($pdf, $im);

-----------------------
PHP 4.2.3
GD 2.0.8
PDFLib 4.0.3 (compiled with default options)

Configure Options:

./configure \
                      --with-config-file-path=/etc \
                      --with-apxs=/usr/local/apache/bin/apxs \
                      --enable-versioning \
                      --enable-inline-optimization \
                      --enable-magic-quotes \
                      --enable-track-vars \
                      --with-xml --with-dom --with-xmlrpc \
                      --with-mysql=/usr \
                      --enable-sockets \
                      --with-ldap \
                      --with-imap=/usr/local --with-imap-ssl=/usr/local \
                      --with-mm \
                      --enable-memory-limit \
                      --enable-bcmath \
                      --enable-sigchild \
                      --with-zlib=/usr \
                      --with-curl=/usr/local \
                      --with-dom=/usr/include/libxml2/libxml \
                      --enable-exif \
                      --enable-ftp \
                      --with-gettext=/usr/share \
                      --with-gd \
                      --with-ttf \
                      --with-freetype-dir=/usr/local/include/freetype2/freetype \
                      --enable-gd-imgstrttf \
                      --with-png-dir=/usr \
                      --with-jpeg-dir=/usr \
                      --with-tiff-lib=/usr \
                      --with-mcal=../libmcal \
                      --with-openssl \
                      --with-mcrypt --with-mhash \
                      --with-pspell \
                      --with-ming \
                      --with-pdflib



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-03 05:31 UTC] derick@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip
 [2002-12-03 05:32 UTC] tb at scarptor dot net
Clarification: 256 color images can be created with
ImageCreate, however ImageCreateTrueColor and possibly 
other calls intended to create images with more than 256 colors fails.
 [2002-12-03 05:51 UTC] tb at scarptor dot net
Tried with the latest snapshot, 200212031030 and
unfortunately it didn't work either.
 [2002-12-03 13:26 UTC] iliaa@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 15:01:29 2024 UTC