검색결과 리스트
글
jPsdReader
About jPsdReader
순수한 javascript 로 작성된 포토샵 파일인 *.psd reader 입니다.
jQuery 같은 외부 라이브러리가 필요 없으며, *.psd 파일의 각종 정보 및 이미지 추출을 도와줍니다.
Installation
jPsdReader.js 스크립트를 로드해 주기만 하면 됩니다.
트레픽 부하방지와 안정적인 서비스를 위해, 스크립트 파일을 다운로드 받으신 후, 사용하시기 바랍니다.
다운로드 :  jPsdReader.zip
jPsdReader.zip 
Usage
psd 파일의 width, height 를 얻기 위해서는 아래와 같이 하시면 됩니다.
이외의 더 많은 기능들은 document 를 참고하시기 바랍니다.
API Document: http://und3r.cafe24.com/jPsdReader/
API Document:
<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 = "https://t1.daumcdn.net/cfile/tistory/230B593456E6F02C30" + psd.getLayers()[0].getImage();
                    psd.dispose();
                },
                error: function(e) {
                   alert(e.message);
                }
           });
        }
    </script>
</head>
    <input id="file" type="file"/>
    <img id="img"/>
    <input type="button" onclick="loadImage()" value="load"/> 
License
MIT license 를 따릅니다.
Contact
문의 사항이나 버그는 본 게시물 댓글 혹은 und3rs@gmail.com 으로 부탁드립니다.
'Web' 카테고리의 다른 글
| PHP Web Framework - Phalcon (2) | 2015.03.12 | 
|---|---|
| javascript 로 layer 드래그 기능 만들기 (0) | 2012.05.23 | 
 
								
RECENT COMMENT