-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.php
36 lines (29 loc) · 821 Bytes
/
test.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<html>
<head>
</head>
<div id="image"></div>
<?php
//require 'vendor/autoload.php';
require 'classPhpPsdReader.php';
// Send header to client browser
//header("Content-type: image/jpeg");
// Includes the requested class
$im = @imagecreatefrompsd('test.psd');
if (!$im)
{
echo 'Invalid image supplied';
}
else
{
imagepng($im, 'out.png');
}
imagedestroy($im);
//header( "Content-type: image/jpeg" );
//$imagine = new Imagine\Gd\Imagine();
//$image = $imagine->open('image.psd');
//echo "<img src='data:image/jpeg;base64," . base64_encode( $image ) . "' />";
//echo "Image contains " . count($image->layers()) . " layers";
//$image=imagejpeg(imagecreatefrompsd('test.psd'));
// echo "<img src='data:image/jpeg;base64," . base64_encode( $image ) . "' />";
?>
</html>