2009년 1월 25일 일요일

About Photoshop File Format Internal

This contents has the article how to generate psd file in your application.
simonsayz@naver.com


포토앨범 맥스페이퍼를 위하여, 수작업으로 분석한 포토샵 파일 구조 분석입니다.
맥스페이퍼 다음버전부터는 포토샵 파일 출력 기능이 추가됩니다.



맥스페이퍼 다운로드 3MB ( http://www.maxpaper.com/ )



주제어 :
맥스페이퍼,maxpaper,포토앨범,포토샵,포토샵 파일구조,RLE,RAW,Packbits,TIFF Standard,
델파이,PSD,PSB,PSD CS,RLE Compressed,압축앨범,성장앨범,자동보정,증명사진,사진인화,
Noritsu,Fujifilm,프론티어 7500,프론티어 7700,Frontier 7500,Panda,Simon,Qss HD



문서 참조를 위하여, 영어로 작성되었습니다.


This is analysis report of the 5x5 pixel psd file (Blue & Red) for maxpaper.

Remarks
Maxpaper is photo album software. (
http://www.maxpaper.com/ )


Last modified : Jan,26,2009
Revision 1.6 by simon,choi
(simonsayz@naver.com)


Preset Variable

Calculated Varitable






Common Header of PSD (RLE Compressed Version)


/- File Header ----------------------------------------------------------------/
38 42 50 53 ; PhotoShop Header / 8BPS
00 01 ; Version
00 00 00 00 00 00 ; Reserved
00 04 ; Channel
00 00 00 05 ; Row (5pixel)
00 00 00 05 ; Column (5pixel)
00 08 ; Depth (8bit)
00 03 ; Mode (RGB )

/- Color Mode Data ------------------------------------------------------------/
00 00 00 00 ; Color Map Data Size

/- Image Resources ------------------------------------------------------------/
00 00 00 44 ; Length (68 Bytes)
38 42 49 4D ; '8BIM'
03 EE ; Alpha Channel Name
00 00 ; Name Length
00 00 00 0D ; Resource Size
0C 54 72 61 6E 73 70 61 72 65 6E 63 79 00 ; Transparency
38 42 49 4D ; '8BIM'
03 ED ; Resolution Info
00 00 ; Name Length
00 00 00 10 ; Resource Size
01 2C 00 00 ; hRes [300]
00 01 ; hResUnit [Pixel per Inch]
00 01 ; WidthUnit [inch]
01 2C 00 00 ; vRes [300]
00 01 ; vResUnit [Pixel per Inch]
00 01 ; HeightUnit [inch]
38 42 49 4D ; '8BIM'
04 00 ; Layer State Information [Target Layer]
00 00 ; Name Length
00 00 00 02 ; Resource Size
00 00 ; [Bottom Layer]


/- Layer and Mask ---------------------------------------------------------/
00 00 01 76 ; Layer Length (374 ) Offset x1
00 00 01 72 ; Layer Info Len (370 = 2 + 106*2 + 88 + 68 ) Offset x1 + 4d
FF FE ; No of Layers, If < 0 -> 1st alpha have transparency area





00 00 00 00 ; Top Offset x2 Layer #1 (106bytes)
00 00 00 01 ; Left
00 00 00 05 ; Bottom
00 00 00 04 ; Right
00 04 ; No Chans
FF FF ; Alpha
00 00 00 16 ;
Length of Alpha Offset x2 + 20d
00 00 ; Red
00 00 00 16 ;
Length of Red Offset x2 + 26d
00 01 ; Green
00 00 00 16 ;
Length of Green Offset x2 + 32d
00 02 ; Blue
00 00 00 16 ;
Length of Blue Offset x2 + 38d
38 42 49 4D ; '8BIM'
6E 6F 72 6D ; 'norm' [normal,darken... ]
FF ; Opacity [0:Transparent..255:Opaque]
00 ; Clip [0:Base, 1:non-base ]
00 ; Flag [0:trans protected, 1 : visible]
00 ; Filler [zero]
00 00 00 30 ; Extra Len
00 00 00 00 ; Mask Len
00 00 00 00 ; Blend Langes
07 4C 61 79 65 72 20 31 ; 'Layer 1'; Layer Name( x 4bytes based,pascal string)
38 42 49 4D ; '8BIM';
6C 75 6E 69 ; luni (Unicode name)
00 00 00 14 ; Length
00 00 00 07 00 4C 00 61 00 79 00 65 00 72 00 20 00 31 00 00 ; 'Layer 1'







00 00 00 01 ; Top Offset x3 Layer #n (106bytes)
00 00 00 00 ; Left
00 00 00 04 ; Bottom
00 00 00 05 ; Right
00 04 ; Chs DB
FF FF ; Alpha
00 00 00 12 ;
Length of Alpha Offset x3 + 20d
00 00 ; Red
00 00 00 12 ;
Length of Red Offset x3 + 26d
00 01 ; Green
00 00 00 12 ;
Length of Green Offset x3 + 32d
00 02 ; Blue
00 00 00 0E ;
Length of Blue Offset x3 + 38d
38 42 49 4D ; '8BIM'
6E 6F 72 6D ; Layer Blend
FF ; Opacity
00 ; Clip
00 ; Flag
00 ; Filler [zero]
00 00 00 30 ; Extra Len
00 00 00 00 ; Mask Len
00 00 00 00 ; Blend Len
07 4C 61 79 65 72 20 31 ; 'Layer 2'; Layer Name( x 4bytes based,pascal string)
38 42 49 4D ; '8BIM'
6C 75 6E 69 ; luni (Unicode name)
00 00 00 14 ; Length
00 00 00 07 00 4C 00 61 00 79 00 65 00 72 00 20 00 32 00 00 ; 'Layer 2'


Layer 1( Transparency,Red,Green,Blue )-------------------------------------








*00 01 ; Alpha / RLE
00 02/00 02/00 02/00 02/00 02 ; ColSize * Height (2x5)
FE FF FE FF FE FF FE FF FE FF ;


16h (88bytes)
Length of Alpha







*00 01 ; Red / RLE
00 02/00 02/00 02/00 02/00 02 ; ColSize * Height (2x5)
FE FF FE FF FE FF FE FF FE FF

16h
Length of Red





*00 01 ; Green / RLE
00 02/00 02/00 02/00 02/00 02 ; ColSize * Height (2x5)
FE 00 FE 00 FE 00 FE 00 FE 00

16h
Length of Green






*00 01 ; Blue / RLE
00 02/00 02/00 02/00 02/00 02 ; ColSize * Height (2x5)
FE 00 FE 00 FE 00 FE 00 FE 00

16h
Length of Blue

FF FF FF FF FF FF 00 00 00 00 00 00
FF FF FF FF FF FF 00 00 00 00 00 00
FF FF FF FF FF FF 00 00 00 00 00 00
FF FF FF FF FF FF 00 00 00 00 00 00
FF FF FF FF FF FF 00 00 00 00 00 00

Layer 2( Transparency,Red,Green,Blue )-------------------------------------








*00 01 ; Alpha / RLE
00 02/00 06/00 02 ; ColSize * Height (2x3)
FC FF/00 FF FE 00 00 FF/FC FF


12h (68bytes)
Length of Alpha







*00 01 ; Red / RLE
00 02/00 06/00 02 ; ColSize * Height (2x3)
FC 00/00 00 FE FF 00 00/FC 00

12h
Length of Red






*00 01 ; Green / RLE
00 02/00 06/00 02 ; ColSize * Height (2x3)
FC 00/00 00 FE FF 00 00/FC 00

12h
Length of Green






*00 01 ; Blue / RLE
00 02/00 02/00 02 ; ColSize * Height (2x3)

FC FF FC FF FC FF

0Eh
Length of Blue


FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 FF FF FF FF FF
FF 00 00 00 FF 00 FF FF FF 00 00 FF FF FF 00 FF FF FF FF FF
FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 FF FF FF FF FF

/- Image Data -----------------------------------------------------------------/
*00 01 ; RLE
00 02/00 02/00 06/00 02/00 02/ ; Alpha ColSize * Height (2x5)
00 06/00 02/00 02/00 02/00 06/ ; Red ColSize * Height (2x5)
00 06/00 02/00 06/00 02/00 06/ ; Green ColSize * Height (2x5)
00 06/00 02/00 02/00 02/00 06/ ; Blue ColSize * Height (2x5)
FC FF /FC 00/00 00 FE FF 00 00/FC 00/
FC FF
00 FF FE 00 00 FF/FC 00/FC 00 /FC 00/
00 FF FE 00 00 FF
00 FF FE 00 00 FF/FC FF/00 FF FE 00 00 FF/FC FF/
00 FF FE 00 00 FF
00 00 FE FF 00 00/FC FF/FC FF /FC FF/
00 00 FE FF 00 00

FF FF FF FF FF FF 00 00 00 FF FF 00 00 00 FF 00 FF FF FF 00

00 00 00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF FF FF
00 FF FF FF 00 00 00 00 00 00 FF 00 00 00 FF FF FF FF FF FF
00 00 00 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF 00 00 00 FF FF 00 00 00 FF
00 FF FF FF 00



This is analysis report of the 2x2 pixel psd file (RGBA) for maxpaper.









Common Header of PSD (Uncompressed Version)


/- File Header ----------------------------------------------------------------/
38 42 50 53 ; PhotoShop Header / 8BPS
00 01 ; Version
00 00 00 00 00 00 ; Reserved
00 04 ; Channel
00 00 00 02 ; Row (2 pixel)
00 00 00 02 ; Column (2 pixel)
00 08 ; Depth (8bit)
00 03 ; Mode (RGB )

/- Color Mode Data ------------------------------------------------------------/
00 00 00 00 ; Color Map Data Size

/- Image Resources ------------------------------------------------------------/
00 00 00 44 ; Length (68 Bytes)
38 42 49 4D ; '8BIM'
03 EE ; Alpha Channel Name
00 00 ; Name Length
00 00 00 0D ; Resource Size
0C 54 72 61 6E 73 70 61 72 65 6E 63 79 00 ; Transparency
38 42 49 4D ; '8BIM'
03 ED ; Resolution Info
00 00 ; Name Length
00 00 00 10 ; Resource Size
01 2C 00 00 ; hRes [300]
00 01 ; hResUnit [Pixel per Inch]
00 01 ; WidthUnit [inch]
01 2C 00 00 ; vRes [300]
00 01 ; vResUnit [Pixel per Inch]
00 01 ; HeightUnit [inch]
38 42 49 4D ; '8BIM'
04 00 ; Layer State Information [Target Layer]
00 00 ; Name Length
00 00 00 02 ; Resource Size
00 00 ; [Bottom Layer]


/- Layer and Mask ---------------------------------------------------------/
00 00 00 88 ; Layer Length ( 136 ) Offset x1
00 00 00 84 ; Layer Info Len ( 132 = 106+24+2 ) Offset x1 + 4d
FF FF ; No of Layers, If < 0 -> 1st alpha have transparency area





00 00 00 00 ; Top Offset x2 Layer #1 (106bytes)
00 00 00 00 ; Left
00 00 00 02 ; Bottom
00 00 00 02 ; Right
00 04 ; No Chans
FF FF ; Alpha
00 00 00 06 ;
Length of Alpha Offset x2 + 20d
00 00 ; Red
00 00 00 06 ;
Length of Red Offset x2 + 26d
00 01 ; Green
00 00 00 06 ;
Length of Green Offset x2 + 32d
00 02 ; Blue
00 00 00 06 ;
Length of Blue Offset x2 + 38d
38 42 49 4D ; '8BIM'
6E 6F 72 6D ; 'norm' [normal,darken... ]
FF ; Opacity [0:Transparent..255:Opaque]
00 ; Clip [0:Base, 1:non-base ]
00 ; Flag [0:trans protected, 1 : visible]
00 ; Filler [zero]
00 00 00 30 ; Extra Len
00 00 00 00 ; Mask Len
00 00 00 00 ; Blend Langes
07 4C 61 79 65 72 20 31 ; 'Layer 1'; Layer Name( x 4bytes based,pascal string)
38 42 49 4D ; '8BIM';
6C 75 6E 69 ; luni (Unicode name)
00 00 00 14 ; Length
00 00 00 07 00 4C 00 61 00 79 00 65 00 72 00 20 00 31 00 00 ; 'Layer 1'


Layer 1( Transparency,Red,Green,Blue )-------------------------------------






*00 00 FF FF/FF 00 ; Alpha / Raw


06h (24bytes)







*00 01 FF 00/00 FF ; Red / Raw

06h






*00 01 00 FF/00 FF ; Green / Raw

06h






*00 01 FF 00/FF FF ; Blue / Raw

06h

FF FF FF 00 00 FF 00 00
FF 00 00 FF 00 FF FF FF


/- Image Data -----------------------------------------------------------------/
*00 00 ; Raw Data
FF 00/00 FF ; Alpha
00 FF/00 FF ; Red
00 00/FF FF ; Green
FF FF/FF 00 ; Blue ColSize * Height (2x5)

FF 00 00 FF 00 00 FF FF
00 FF 00 FF FF FF FF 00


댓글 없음: