How to open PSD/DDS/BMP images in PHP
Image conversion from various formats

<?php
$url = 'http://your_server.com/image.psd'; //it can be PSD, BMP, DDS and so on
$data = json_decode(file_get_contents('http://api.rest7.com/v1/image_convert.php?url=' . $url . '&format=png'));
if (@$data->success !== 1)
{
die('Failed');
}
$image = file_get_contents($data->file);
file_put_contents('converted.png', $image);
Now we have an image in PNG format named "converted.png". We can open it in PHP without any more problems:$im = imagecreatefrompng('converted.png');
//here do your pixel manipulations or anything else
Comments