Index

About jPsdReader

A complete solution to read *.psd file on web browser.
jPsdReader doesn't use any library likes jQuery.


Installation

The only thing you need to do is to load script in your page.
Download jPsdReader.js into your site and insert following code in your document.
(Please do not directly link jPsdReader.js into your site from here.)

<script src="./jPsdReader.js" type="text/javascript"></script>


Usage

<head>
    <script src="./jPsdReader.js" type="text/javascript"></script>
    <script>
        function loadImage() {
           var psdFile = document.getElementById("file").files[0];
           jPsdReader.load({
                file: psdFile,
                success: function(psd) {
            alert("document size: " + psd.width + " x " + psd.height);
                    document.getElementById("img").src = "data:image/png;base64," + psd.getLayers()[0].getImage();
                    psd.dispose();
                },
                error: function(e) {
                   alert(e.message);
                }
           });
        }
    </script>
</head>
<body>
    <input id="file" type="file"/>
    <img id="img"/>
    <input type="button" onclick="loadImage()" value="load"/> 
</body>


License

jPsdReader projects are released under the terms of the MIT license.
The MIT License is simple and easy to understand and it places almost no restrictions on what you can do with a jPsdReader project.
You are free to use any jPsdReader project in any other project (even commercial projects) as long as the copyright header is left intact.


Contact

If you want to contact me, please send e-mail to und3rs@gmail.com