This is the OLD WebbyZone archive. Click Here if you wish to check out the all NEW WebbyZone.

PHP Class To Display Adobe PSD Files On A Web Page

Post image of PHP Class To Display Adobe PSD Files On A Web Page
Filed in Web Development 1 comments

It’s not usually possible to display Adobe PSD files in a web page. But there are times when such display becomes a need. And it is possible to make such a display quite easily with the help of a PHP class. Here’s how it goes -

1. Download the classPhpPsdReader.php – The class is written by Tim de Koning. It can be used to open images in the PhotoShop PSD format. It creates a GD true color image and renders the image read from a PhotoShop image file. A function named imagecreatefrompsd() is provided to simplify the creation of images from PhotoShop files using this class.

2. Unzip and upload the php file on your server.

3. Here’s an example of the code for displaying -

<?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'));
?>

Thats it! You are all set to display Adobe PSD files in your website.

Posted by Ranadeep   @   23 October 2009 1 comments
Tags : , , , ,

1 Comments

Comments
Nov 6, 2009
3:10 pm

nice man , love u

Leave a Comment

Name

Email

Website

Previous Post
«
Next Post
»
CrossBlock designed by ZenVerse