diff options
Diffstat (limited to 'ext/zip/examples/im.php')
-rw-r--r-- | ext/zip/examples/im.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ext/zip/examples/im.php b/ext/zip/examples/im.php new file mode 100644 index 0000000..3721434 --- /dev/null +++ b/ext/zip/examples/im.php @@ -0,0 +1,11 @@ +<?php +/* $Id$ */ +$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'); + |