Documentation ¶
Index ¶
- Constants
- func NewDocument(fileName string) *document
- func NewDocumentFromByte(b []byte) *document
- func ParseFormFile(filename string)
- func StringValueIs(value string, values ...string) bool
- func UnpackRLEBits(data []byte, length int) []byte
- type AdditionalLayerInformation
- type BooleanStructureEntity
- type ChannelInformation
- type ClassStructureEntity
- type Color
- type ColorModeData
- type CommonStateInfo
- type Descriptor
- type DescriptorStructure
- type DropAndInnerShadowInfo
- type EffectsLayerInfo
- type EnumeratedDescriptorEntity
- type EnumeratedReferenceEntity
- type FileHeader
- type FileType
- type ImageData
- type ImageResources
- type LayerBlendingRangesData
- type LayerInfo
- type LayerMaskInformation
- type LayerMaskORAdjustmentLayerData
- type LayerRecords
- type ListStructureEntity
- type LongEntity
- type MetadataSetting
- type OffsetStructureEntity
- type PropertyStructureEntity
- type Rectangle
- type ReferenceStructureEntity
- type ResourceVersionInfo
- type SlicesHeader
- type SlicesResourceBlock
- type SlicesResourceFormat
- type StringStructureEntity
- type StructureEntity
- type UnitFloatStructureEntity
Constants ¶
View Source
const ( BIT_MAP colorMode = 0 GRAYSCALE = 1 INDEXED = 2 RGB = 3 CMYK = 4 MULTI_CHANNEL = 7 DUOTONE = 8 LAB = 9 )
Variables ¶
This section is empty.
Functions ¶
func NewDocument ¶
func NewDocument(fileName string) *document
func NewDocumentFromByte ¶
func NewDocumentFromByte(b []byte) *document
func ParseFormFile ¶
func ParseFormFile(filename string)
func StringValueIs ¶
func UnpackRLEBits ¶
Types ¶
type BooleanStructureEntity ¶
type BooleanStructureEntity struct {
// contains filtered or unexported fields
}
type ChannelInformation ¶
type ClassStructureEntity ¶
type ColorModeData ¶
func (*ColorModeData) Inits ¶
func (colorMode *ColorModeData) Inits(doc *document)
type CommonStateInfo ¶
type Descriptor ¶
type Descriptor struct { Key string Type string Value StructureEntity // contains filtered or unexported fields }
type DescriptorStructure ¶
type DescriptorStructure struct { Name string ClassId string ItemsNumber uint32 Items map[string]*Descriptor }
type DropAndInnerShadowInfo ¶
type DropAndInnerShadowInfo struct { // Size of the remaining items: 41 or 51 (depending on version) RemainingItems uint32 // Version: 0 ( Photoshop 5.0) or 2 ( Photoshop 5.5) Version uint32 // Blur value in pixels PixelsBlurValue uint32 // Intensity as a percent Intensity uint32 // Angle in degrees AngleDegrees uint32 // Distance in pixels Distance uint32 // Color: 2 bytes for space followed by 4 * 2 byte color component Color []byte // Blend mode: 4 bytes for signature and 4 bytes for key BlendMode []byte // Effect enabled Enabled bool // Opacity as a percent Opacity byte // Native color: 2 bytes for space followed by 4 * 2 byte color component NativeColor []byte // contains filtered or unexported fields }
type EffectsLayerInfo ¶
type FileHeader ¶
type FileHeader struct { // Mac OS: 8BPS // Windows: .PSD FileType FileType Version uint16 Reserved []byte Channels uint16 Height uint32 Width uint32 Depth uint16 ColorMode colorMode }
func (*FileHeader) Inits ¶
func (header *FileHeader) Inits(document *document)
type ImageData ¶
****************************************************************************
* * Image Data * *****************************************************************************
func (*ImageData) Inits ¶
func (img *ImageData) Inits(doc *document, _fileHeader *FileHeader)
#http://www.adobe.com/devnet-apps/photoshop/fileformatashtml/#50577409_89817
type ImageResources ¶
type ImageResources struct { Length uint32 ImageResourcesBuf *document ImageResource map[uint16]interface{} }
func (*ImageResources) Inits ¶
func (imageResources *ImageResources) Inits(doc *document)
type LayerBlendingRangesData ¶
type LayerInfo ¶
type LayerInfo struct { Length uint64 LayerCount uint16 LayerRecords []*LayerRecords }
type LayerMaskInformation ¶
type LayerMaskInformation struct { Length uint64 LayerMaskInformationBuf *document LayerInfo *LayerInfo }
****************************************************************************
* * LayerMaskInformation * *****************************************************************************
func (*LayerMaskInformation) Inits ¶
func (layreMask *LayerMaskInformation) Inits(doc *document, _fileHeader *FileHeader)
type LayerRecords ¶
type LayerRecords struct { ID uint32 Rectangle *Rectangle ChannelsNumber uint16 ChannelInformations []*ChannelInformation BlendModeSignature string BlendModeKey string Opacity byte Clipping byte Flags byte Filler byte ExtraDataFieldLength uint32 LayerMaskORAdjustmentLayerData *LayerMaskORAdjustmentLayerData LayerBlendingRangesData *LayerBlendingRangesData LayerName string LayerNameSourceSetting string AdditionalLayerInformation *AdditionalLayerInformation VectorOrigination *DescriptorStructure ProtectionFlags uint32 Color *Color MetadataSetting *MetadataSetting EffectsLayerInfo *EffectsLayerInfo ReferencePoint []float64 // contains filtered or unexported fields }
http://www.adobe.com/devnet-apps/photoshop/fileformatashtml/#50577409_13084
type ListStructureEntity ¶
type ListStructureEntity struct { ItemsNumber uint32 DescriptorList []*Descriptor }
type LongEntity ¶
type LongEntity struct {
Value uint64
}
type MetadataSetting ¶
type OffsetStructureEntity ¶
type PropertyStructureEntity ¶
type ReferenceStructureEntity ¶
type ReferenceStructureEntity struct {
// contains filtered or unexported fields
}
type ResourceVersionInfo ¶
type ResourceVersionInfo struct { Version uint32 HasRealMergedData byte WriterName string ReaderName string FileVersion uint32 }
*
- 0x0421 1057 (Photoshop 6.0) Version Info. 4 bytes version, 1 byte hasRealMergedData , Unicode string: writer name, Unicode string: reader name, 4 bytes file version.
type SlicesHeader ¶
type SlicesResourceBlock ¶
type SlicesResourceBlock struct { ID uint32 GroupId uint32 Origin uint32 AssociatedLayerID uint32 Name string Type uint32 Left uint32 Top uint32 Right uint32 Bottom uint32 URL string Target string Message string AltTag string CellTextIsHTML bool CellText string HorizontalAlignment uint32 VerticalAlignment uint32 AlphaColor byte Red byte Green byte Blue byte DescriptorVersion uint32 // contains filtered or unexported fields }
type SlicesResourceFormat ¶
type SlicesResourceFormat struct { Header *SlicesHeader Blocks []*SlicesResourceBlock }
*
- 0x041A 1050 (Photoshop 6.0) Slices. See (See Slices resource format)[http://www.adobe.com/devnet-apps/photoshop/fileformatashtml/PhotoshopFileFormats.htm#50577409_19931]
- Adobe Photoshop 6.0 stores slices information for an image in an image resource block.
- Adobe Photoshop 7.0 added a descriptor at the end of the block for the individual slice info.
- Adobe Photoshop CS and later changed to version 7 or 8 and uses a Descriptor to defined the Slices data.
type StringStructureEntity ¶
type StringStructureEntity struct {
Value string
}
type StructureEntity ¶
type StructureEntity interface {
// contains filtered or unexported methods
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.