summaryrefslogtreecommitdiff
path: root/ext/zip/examples/im.php
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2006-07-24 16:58:58 +0000
committerPierre Joye <pajoye@php.net>2006-07-24 16:58:58 +0000
commit719447d3b6e2ebcb86925c79bb6ba87996be6711 (patch)
tree847a35fc9c48bfa3627d8418a01d74e8aca37c3f /ext/zip/examples/im.php
parentb0e3dfab13d4c805e103300eb1f8428704039255 (diff)
downloadphp-git-719447d3b6e2ebcb86925c79bb6ba87996be6711.tar.gz
- reimport (cannot symlink without replacing 4.4 and 5.0 versions)
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');
+