xref: /PHP-7.2/ext/zip/examples/im.php (revision 60a69dae)
1<?php
2/* $Id$ */
3$im = imagecreatefromgif('zip://' . dirname(__FILE__) . '/test_im.zip#pear_item.gif');
4imagepng($im, 'a.png');
5
6$z = new ZipArchive();
7$z->open(dirname(__FILE__) . '/test_im.zip');
8$im_string = $z->getFromName("pear_item.gif");
9$im = imagecreatefromstring($im_string);
10imagepng($im, 'b.png');
11