xref: /PHP-8.3/ext/zip/examples/im.php (revision 1ad08256)
1<?php
2
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