summaryrefslogtreecommitdiff
path: root/ext/zip/examples/im.php
diff options
context:
space:
mode:
authorSVN Migration <svn@php.net>2006-07-24 16:58:59 +0000
committerSVN Migration <svn@php.net>2006-07-24 16:58:59 +0000
commit664d102aa65af165bf25163b220424e67241369c (patch)
treeb646eb8123fe74905c50450b3971826383c41b75 /ext/zip/examples/im.php
parent467e129ce5aae75bc23ad69f7c4f66985382bd5a (diff)
downloadphp-git-664d102aa65af165bf25163b220424e67241369c.tar.gz
This commit was manufactured by cvs2svn to create branch 'PHP_5_2'.
Diffstat (limited to 'ext/zip/examples/im.php')
-rw-r--r--ext/zip/examples/im.php11
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 0000000000..3721434054
--- /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');
+