I working on ipa file which is ios app and I am trying to extract app's icon using php IPA Distribution
and all things go fine , but when I trying to display that image into web browser the image can not displayed .
I think the image is compressed so I can not display it into web browser . so how can I decompress this image using php to be able display it in to browser?
this is the code which I used to get image from ipa file
function getIcon ($ipa) {
// $newstring = substr($dynamicstring, -7);
$zip = zip_open($ipa);
if ($zip) {
while ($zip_entry = zip_read($zip)) {
$fileinfo = pathinfo(zip_entry_name($zip_entry));//var_dump($fileinfo);//echo ($fileinfo['basename']);
if ( strpos($fileinfo['basename'], '.png') ) {echo $fileinfo['filename'];
$fp = fopen($this->folder.'/'.$fileinfo['basename'], "w");
if (zip_entry_open($zip, $zip_entry, "r")) {
$buf = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry));
fwrite($fp,"$buf");
zip_entry_close($zip_entry);
fclose($fp);
}
$this->appicon = $this->folder."/".'image@3x.png';
}
}
zip_close($zip);
}
}
this code will extract image from ipa file and put it into image folder but when I trying to display that image using html code like this
<img src="files/5ac5633052369/image@3x.png">
and I am sure about image's url