Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $fcontents = file_get_contents($imgname);
- $im = @imagecreatefromstring($fcontents);
- $loader = new ElphinIcoFileLoaderIcoFileService;
- $im = $loader->extractIcon('/path/to/icon.ico', 32, 32);
- //$im is a GD image resource, so we could, for example, save this as a PNG
- imagepng($im, '/path/to/output.png');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement