| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2012-06-13 08:12 UTC] carsten_sttgt at gmx dot de
 
-Summary: readImageFile not working and
          writeImageFile/writeImagesFile
+Summary: readImageFile not working and
          writeImageFile/writeImagesFile are missing
  [2012-06-13 08:12 UTC] carsten_sttgt at gmx dot de
  | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 15:00:01 2025 UTC | 
Description: ------------ Hello, - PHP-5.4.3 - PECL gmagick-1.1.0RC3 - GraphicsMagick-1.3.13 readImageFile() isn't working with a correct filepointer. And even it it's working, the correspondending writeImageFile/writeImagesFile are missing. If I change: $gmagick->readImageFile($fp); to: $gmagick->readImageBlob(stream_get_contents($fp)); it's working. BTW: Of course, $gmagick->__toString() is working. But it would be nice to have a correspondending getImageBlob like in Imagick. Regards, Carsten Test script: --------------- <?php $fp = fopen('test1.jpg', 'rb'); $gmagick = new Gmagick(); $gmagick->readImageFile($fp); ?> Expected result: ---------------- No exception. Actual result: -------------- [13-Jun-2012 07:25:43 UTC] PHP Fatal error: Uncaught exception 'GmagickException' with message 'Not a JPEG file: starts with 0x2a 0xd1 ()' in C:\Test\test.php:5 Stack trace: #0 C:\Test\test.php(5): Gmagick->readimagefile(Resource id #3) #1 {main} thrown in C:\Test\test.php on line 5