summaryrefslogtreecommitdiff
path: root/ext/zip/examples/im.php
blob: 3721434054d19f4c92d52f2f86cffa4a05f34681 (plain)
1
2
3
4
5
6
7
8
9
10
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');