php-src/ext/zip/examples/im.php
Peter Kokot 0eabd5231b Remove unused Git ident attributes from zip extension
$Id attributes were used with SVN. With Git most of the Git ident
attributes in source code files are not used anymore.
2018-07-27 15:49:34 +02:00

11 lines
301 B
PHP

<?php
$im = imagecreatefromgif('zip://' . dirname(__FILE__) . '/test_im.zip#pear_item.gif');
imagepng($im, 'a.png');
$z = new ZipArchive();
$z->open(dirname(__FILE__) . '/test_im.zip');
$im_string = $z->getFromName("pear_item.gif");
$im = imagecreatefromstring($im_string);
imagepng($im, 'b.png');