The classPhpPsdReader.php Class

The classPhpPsdReader.php Class was created by Tim de Koning in 2007. It is based on the GD library, which can do numerous operations on images with PHP, but sadly, can’t open PSD files.

The classPhpPsdReader.php Class can be downloaded for free on PhpClasses.org. It is compatible with both PHP4 and PHP5.

Usage

Nothing hard here. Once you have downloaded the classPhpPsdReader.php class and uploaded it on your server, you’re now ready to display PSD throught a web browser.
To do so, just refer to the following code example:

<?php
// Send header to client browser
header("Content-type: image/jpeg");
// Includes the requested class
include_once('classPhpPsdReader.php');
// Finally display the PSD on the screen
imagejpeg(imagecreatefrompsd('yourPsdFile.psd'));
?>

The result

Reading psd files with php
Great tool for people who are, like me, both webdevelopers and webdesigners!

On another note, I just purchased a new blog to complete my network. The blog is called PsdVibe and you can have a look here. The blog focus on providing Adobe Photoshop tutorials, resources and freebies.

Related Posts

No related posts.