답변포토샵이나 ACDSee 에서 적은 IPTC 규약의 정보를 flex 는 읽어 올수 있나 하는 질문입니다.
php에서는 읽을 수 있는데 flex 나 air 에서 직접읽을수 있으면 더 좋은 상황이라 질문을 적습니다.
이걸 읽어야 사용자의 작업이 편해 지는 상황인지라..^^
api 는 찾아도 없는건지 제가 못 찾은 건지...
혹여 알고 계시는분 힌트 좀 주세요.
검쉰 |
검쉰 |
--------------------------------------------------------------------------------------
http://code.shichiseki.jp/as3/ExifInfo/
Exif library for AS3
This library can read and parse Exif information about a JPEG file. The Exif contains various information about the JPEG file such as the thumbnail image of the JPEG file, image resolution and so on.
See http://www.exif.org/Exif2-2.PDF for details of Exif specification.
Demo
You can see a demo SWF in here (source code of this demo).
Download
You can download this library from CodeRepos by using Subversion. This is the only way to obtain this library for now.
To download Exif library for AS3, use following command:
% svn co http://svn.coderepos.org/share/lang/actionscript/ExifInfo .
Examples
Display thumbnail image
The following code displays original JPEG image and thumbnail image.
import jp.shichiseki.exif.*; var loader:ExifLoader = new ExifLoader(); private function loadImage():void { loader.addEventListener(Event.COMPLETE, onComplete); loader.load(new URLRequest("http://www.example.com/sample.jpg")); } private function onComplete(e:Event):void { // display image addChild(loader); // display thumbnail image var thumbLoader:Loader = new Loader(); thumbLoader.loadBytes(loader.exif.thumbnailData); addChild(thumbLoader); }
Show Exif IFD informations
The following code shows Exif IFD information.
import jp.shichiseki.exif.*; var loader:ExifLoader = new ExifLoader(); private function loadImage():void { loader.addEventListener(Event.COMPLETE, onComplete); loader.load(new URLRequest("http://www.example.com/sample.jpg")); } private function onComplete(e:Event):void { if (loader.exif.ifds.primary) displayIFD(loader.exif.ifds.primary); if (loader.exif.ifds.exif) displayIFD(loader.exif.ifds.exif); if (loader.exif.ifds.gps) displayIFD(loader.exif.ifds.gps); if (loader.exif.ifds.interoperability) displayIFD(loader.exif.ifds.interoperability); if (loader.exif.ifds.thumbnail) displayIFD(loader.exif.ifds.thumbnail); } private function displayIFD(ifd:IFD):void { trace(" --- " + ifd.level + " --- "); for (var entry:String in ifd) { trace(entry + ": " + ifd[entry]); } }
Documentation
An ASDoc-style API documentation is available here.
Following XML-formatted documents describe the tags which are contained in Exif IFDs.
- 0th IFD TIFF Tags
- 0th IFD Exif Private Tags
- 0th IFD GPS Info Tags
- 0th IFD Interoperability Tags
- 1st IFD TIFF Tags
License
MIT-license
'컴터 > Flash & Flex' 카테고리의 다른 글
Alert.show : YES,NO,CANCEL,OK 로 나눠서 이벤트 처리하기 (0) | 2008.09.01 |
---|---|
이미지의 exif 중 타이틀과 캡션뺴오기.. (0) | 2008.08.29 |
Flex 퍼가기 태그 (0) | 2008.08.19 |
url 얻어오기 (0) | 2008.08.19 |