Classes | |
| struct | AdditionalLayerInfo |
| struct | BlendChannelInfo |
| class | ChannelInfo |
| struct | IMAGERESOURCES |
| struct | LAYERSTATE |
| class | LRect |
| struct | PSD_FILE_HEADER |
| class | PSDFileMeta |
| The PSDFileMeta object contains meta data about the psd file, such header information, the number of layers, etc... More... | |
| class | PSDLayerMeta |
| The PSDLayerMeta object contains informations about a layer. More... | |
| struct | RESOLUTIONINFO |
| struct | SectionDividerSetting |
Functions | |
| PSDFile MBDLL_DECL * | PSDOpen (const QString &fileName, bool write=false) |
| Open a Photoshop(PSD) file and fill internally meta data (file meta and layers meta data). More... | |
| PSDError MBDLL_DECL | PSDGetLastError (PSDFile *psdFile) |
| Obtain the last status of libPSD. More... | |
| const MBDLL_DECL PSDFileMeta * | PSDGetFileMeta (const PSDFile *psdFile) |
| Get the file metadata of a PSD file. More... | |
| bool MBDLL_DECL | PSDSetFileMeta (PSDFile *psdFile, const PSDFileMeta *psdFileMeta) |
| Set the file metadata of psdFile. More... | |
| const MBDLL_DECL PSDLayerMeta * | PSDGetLayerMeta (const PSDFile *psdFile, unsigned int layerIndex) |
| Get the layer meta data for layerIndex of psdFile object. More... | |
| void MBDLL_DECL | PSDSetLayerMeta (PSDFile *psdFile, unsigned int layerIndex, PSDLayerMeta *psdLayerMeta) |
| Set the layer meta data for layerIndex of psdFile object. More... | |
| bool MBDLL_DECL | PSDReadChannelImageData (PSDFile *psdFile, unsigned int layerIndex, unsigned int channelIndex, void *buffer, size_t bufferSize) |
| Read the channel image data for this layer and this channel of psdFile object. More... | |
| bool MBDLL_DECL | PSDWriteChannelImageData (PSDFile *psdFile, unsigned int layerIndex, unsigned int channelIndex, void *buffer, size_t bufferSize) |
| bool MBDLL_DECL | PSDReadChannelImageData (PSDFile *psdFile, void *buffer, size_t bufferSize) |
| bool MBDLL_DECL | PSDReadCompositeImageData (PSDFile *psdFile, unsigned int imageWidth, unsigned int imageHeight, void *buffer, size_t bufferSize) |
| bool MBDLL_DECL | PSDWriteCompositeImageData (PSDFile *psdFile, unsigned int imageWidth, unsigned int imageHeight, CompressionMethod compressMethod, void *buffer, size_t bufferSize) |
| bool MBDLL_DECL | PSDWrite4ChanCompositeImageData (PSDFile *psdFile, unsigned int imageWidth, unsigned int imageHeight, CompressionMethod compressMethod, void **ARGBPixels) |
| void MBDLL_DECL | PSDClose (PSDFile *psdFile) |
| Close the psdFile object and free all private data. More... | |
| bool MBDLL_DECL | PSDBlendLayers (unsigned char *rSrc, unsigned char *gSrc, unsigned char *bSrc, unsigned char *aSrc, float glbOpacity, LRect inRectLayer1, int blendMode, unsigned int inWidth, unsigned int inHeight, unsigned char *&rDst, unsigned char *&gDst, unsigned char *&bDst, unsigned char *&aDst) |
| BlendLayers is a helper function that blend 2 layers based on the src's blend mode. More... | |
| void MBDLL_DECL | PSDInterleaveImageData (int nPixels, const unsigned char *r, const unsigned char *g, const unsigned char *b, const unsigned char *a, unsigned int *target, bool multAlpha=true) |
| InterleaveImageData takes the 4 seperate RGBA planes and interleaves them into a single RGBA image – optionally multiplying the RGB by the alpha. More... | |
| void MBDLL_DECL | PSDInterleaveImageData16_16 (int nPixels, const unsigned short *r, const unsigned short *g, const unsigned short *b, const unsigned short *a, unsigned short *target, bool multAlpha=true) |
| InterleaveImageData16 takes the 4 separate 16 bit RGBA planes and interleaves them into a single 16 bit per channel RGBA image – optionally multiplying the RGB by the alpha. More... | |
| void MBDLL_DECL | PSDInterleaveImageData32_32 (int nPixels, const float *r, const float *g, const float *b, const float *a, float *target, bool multAlpha=true) |
| InterleaveImageData32 takes the 4 separate 32 bit float RGBA planes and interleaves them into a single 32 bit float per channel RGBA image – optionally multiplying the RGB by the alpha. More... | |
| void MBDLL_DECL | PSDInterleaveImageData16 (int nPixels, const unsigned short *r, const unsigned short *g, const unsigned short *b, const unsigned short *a, unsigned int *target, bool multAlpha=true) |
| InterleaveImageData16 takes the 4 separate 16 bit RGBA planes and interleaves them into a single 8 bit per channel RGBA image – optionally multiplying the RGB by the alpha. More... | |
| void MBDLL_DECL | PSDInterleaveImageData32 (int nPixels, const float *r, const float *g, const float *b, const float *a, unsigned int *target, bool multAlpha=true) |
| InterleaveImageData32 takes the 4 separate 32 bit float RGBA planes and interleaves them into a single 8 bit per channel RGBA image – optionally multiplying the RGB by the alpha. More... | |
| enum PSDBlendMode |
Definition at line 34 of file LibPSD.h.
| enum PSDError |
Definition at line 66 of file LibPSD.h.
| enum CompressionMethod |
| Enumerator | |
|---|---|
| PSD_COMPRESSION_NONE | |
| PSD_COMPRESSION_RAW | |
| PSD_COMPRESSION_RLE | |
| PSD_COMPRESSION_ZIP | |
| PSD_COMPRESSION_ZIP_PREDICTION | |
| enum layerType |
| Enumerator | |
|---|---|
| LAYER_NORMAL | |
| LAYER_SET_OPEN | |
| LAYER_SET_CLOSED | |
| LAYER_DIVIDER | |
| PSDFile MBDLL_DECL* adsk::libPSD::PSDOpen | ( | const QString & | fileName, |
| bool | write = false |
||
| ) |
Open a Photoshop(PSD) file and fill internally meta data (file meta and layers meta data).
| utf8Name | the file name of the PSD file. |
| write | set to true to open the file for writing |
| PSDError MBDLL_DECL adsk::libPSD::PSDGetLastError | ( | PSDFile * | psdFile | ) |
Obtain the last status of libPSD.
| psdFile | the private object represending this open PSD file. |
| const MBDLL_DECL PSDFileMeta* adsk::libPSD::PSDGetFileMeta | ( | const PSDFile * | psdFile | ) |
Get the file metadata of a PSD file.
| psdFile | the private object represending this open PSD file. |
| bool MBDLL_DECL adsk::libPSD::PSDSetFileMeta | ( | PSDFile * | psdFile, |
| const PSDFileMeta * | psdFileMeta | ||
| ) |
Set the file metadata of psdFile.
| psdFile | the private object represending this open PSD file. |
| psdFileMeta | the file meta data that contains basic information like the number of layers, etc... This information must be filly filled in before calling this function – it causes the PSD file header to be written |
| const MBDLL_DECL PSDLayerMeta* adsk::libPSD::PSDGetLayerMeta | ( | const PSDFile * | psdFile, |
| unsigned int | layerIndex | ||
| ) |
Get the layer meta data for layerIndex of psdFile object.
| psdFile | the private object represending this open PSD file. |
| layerIndex | the layer index. |
| void MBDLL_DECL adsk::libPSD::PSDSetLayerMeta | ( | PSDFile * | psdFile, |
| unsigned int | layerIndex, | ||
| PSDLayerMeta * | psdLayerMeta | ||
| ) |
Set the layer meta data for layerIndex of psdFile object.
| psdFile | the private object represending this open PSD file. |
| layerIndex | the layer index. |
| psdLayerMeta | the layer meta data that contains all layers data, like number of channels, etc... |
| bool MBDLL_DECL adsk::libPSD::PSDReadChannelImageData | ( | PSDFile * | psdFile, |
| unsigned int | layerIndex, | ||
| unsigned int | channelIndex, | ||
| void * | buffer, | ||
| size_t | bufferSize | ||
| ) |
Read the channel image data for this layer and this channel of psdFile object.
| psdFile | the private object represending this open PSD file. |
| layerIndex | the layer index value. |
| channelIndex | the channel index value. |
| buffer | the buffer will be filled with image data. Caller responsible for memory management of this buffer. |
| bufferSize | the size of the buffer. ( layer's width * layer's height * sizeof(char) ) |
| bool MBDLL_DECL adsk::libPSD::PSDWriteChannelImageData | ( | PSDFile * | psdFile, |
| unsigned int | layerIndex, | ||
| unsigned int | channelIndex, | ||
| void * | buffer, | ||
| size_t | bufferSize | ||
| ) |
| bool MBDLL_DECL adsk::libPSD::PSDReadChannelImageData | ( | PSDFile * | psdFile, |
| void * | buffer, | ||
| size_t | bufferSize | ||
| ) |
| bool MBDLL_DECL adsk::libPSD::PSDReadCompositeImageData | ( | PSDFile * | psdFile, |
| unsigned int | imageWidth, | ||
| unsigned int | imageHeight, | ||
| void * | buffer, | ||
| size_t | bufferSize | ||
| ) |
| bool MBDLL_DECL adsk::libPSD::PSDWriteCompositeImageData | ( | PSDFile * | psdFile, |
| unsigned int | imageWidth, | ||
| unsigned int | imageHeight, | ||
| CompressionMethod | compressMethod, | ||
| void * | buffer, | ||
| size_t | bufferSize | ||
| ) |
| bool MBDLL_DECL adsk::libPSD::PSDWrite4ChanCompositeImageData | ( | PSDFile * | psdFile, |
| unsigned int | imageWidth, | ||
| unsigned int | imageHeight, | ||
| CompressionMethod | compressMethod, | ||
| void ** | ARGBPixels | ||
| ) |
| void MBDLL_DECL adsk::libPSD::PSDClose | ( | PSDFile * | psdFile | ) |
Close the psdFile object and free all private data.
Regardless of error status, this function needs to be called when done with a file, otherwise memory will leak.
| psdFile | the private object represending this open PSD file. |
| bool MBDLL_DECL adsk::libPSD::PSDBlendLayers | ( | unsigned char * | rSrc, |
| unsigned char * | gSrc, | ||
| unsigned char * | bSrc, | ||
| unsigned char * | aSrc, | ||
| float | glbOpacity, | ||
| LRect | inRectLayer1, | ||
| int | blendMode, | ||
| unsigned int | inWidth, | ||
| unsigned int | inHeight, | ||
| unsigned char *& | rDst, | ||
| unsigned char *& | gDst, | ||
| unsigned char *& | bDst, | ||
| unsigned char *& | aDst | ||
| ) |
BlendLayers is a helper function that blend 2 layers based on the src's blend mode.
In order to this to work, you need pass a Src and Dst RGBA channels.
| rSrc | The Red channel source. |
| gSrc | The green channel source. |
| bSrc | The blue channel source. |
| aSrc | The alpha channel source. |
| glbOpacity | The Opacity of the layer that will blend Src with |
| inRectLayer1 | The Rect of the Src Layer |
| blendMode | The Blend mode of Src Layer |
| inWidth | The Width of the image |
| inHeight | The Height of the image |
| rDst | The red channel destination |
| gDst | The green channel destination |
| bDst | The blue channel destination |
| aDst | The alpha channel destination, if NULL, it will be allocated by the function, use free(aDst) when done. |
| void MBDLL_DECL adsk::libPSD::PSDInterleaveImageData | ( | int | nPixels, |
| const unsigned char * | r, | ||
| const unsigned char * | g, | ||
| const unsigned char * | b, | ||
| const unsigned char * | a, | ||
| unsigned int * | target, | ||
| bool | multAlpha = true |
||
| ) |
InterleaveImageData takes the 4 seperate RGBA planes and interleaves them into a single RGBA image – optionally multiplying the RGB by the alpha.
| nPixels | The count of the pixels to be processed |
| r | Pointer to the Red plane |
| g | Pointer to the Green plane |
| b | Pointer to the Blue plane |
| a | Pointer to the Alpha plane (can be null – then all alphas are assumed to be opaque) |
| target | Pointer to the target RGBA image |
| multAlpha | true if this function is to multiply the aAlpha into the RGB channels (defaults to true) |
| void MBDLL_DECL adsk::libPSD::PSDInterleaveImageData16_16 | ( | int | nPixels, |
| const unsigned short * | r, | ||
| const unsigned short * | g, | ||
| const unsigned short * | b, | ||
| const unsigned short * | a, | ||
| unsigned short * | target, | ||
| bool | multAlpha = true |
||
| ) |
InterleaveImageData16 takes the 4 separate 16 bit RGBA planes and interleaves them into a single 16 bit per channel RGBA image – optionally multiplying the RGB by the alpha.
| nPixels | The count of the pixels to be processed |
| r | Pointer to the Red plane |
| g | Pointer to the Green plane |
| b | Pointer to the Blue plane |
| a | Pointer to the Alpha plane (can be null – then all alphas are assumed to be opaque) |
| target | Pointer to the target RGBA image |
| multAlpha | true if this function is to multiply the aAlpha into the RGB channels (defaults to true) |
| void MBDLL_DECL adsk::libPSD::PSDInterleaveImageData32_32 | ( | int | nPixels, |
| const float * | r, | ||
| const float * | g, | ||
| const float * | b, | ||
| const float * | a, | ||
| float * | target, | ||
| bool | multAlpha = true |
||
| ) |
InterleaveImageData32 takes the 4 separate 32 bit float RGBA planes and interleaves them into a single 32 bit float per channel RGBA image – optionally multiplying the RGB by the alpha.
| nPixels | The count of the pixels to be processed |
| r | Pointer to the Red plane |
| g | Pointer to the Green plane |
| b | Pointer to the Blue plane |
| a | Pointer to the Alpha plane (can be null – then all alphas are assumed to be opaque) |
| target | Pointer to the target RGBA image |
| multAlpha | true if this function is to multiply the aAlpha into the RGB channels (defaults to true) |
| void MBDLL_DECL adsk::libPSD::PSDInterleaveImageData16 | ( | int | nPixels, |
| const unsigned short * | r, | ||
| const unsigned short * | g, | ||
| const unsigned short * | b, | ||
| const unsigned short * | a, | ||
| unsigned int * | target, | ||
| bool | multAlpha = true |
||
| ) |
InterleaveImageData16 takes the 4 separate 16 bit RGBA planes and interleaves them into a single 8 bit per channel RGBA image – optionally multiplying the RGB by the alpha.
| nPixels | The count of the pixels to be processed |
| r | Pointer to the Red plane |
| g | Pointer to the Green plane |
| b | Pointer to the Blue plane |
| a | Pointer to the Alpha plane (can be null – then all alphas are assumed to be opaque) |
| target | Pointer to the target RGBA image |
| multAlpha | true if this function is to multiply the aAlpha into the RGB channels (defaults to true) |
| void MBDLL_DECL adsk::libPSD::PSDInterleaveImageData32 | ( | int | nPixels, |
| const float * | r, | ||
| const float * | g, | ||
| const float * | b, | ||
| const float * | a, | ||
| unsigned int * | target, | ||
| bool | multAlpha = true |
||
| ) |
InterleaveImageData32 takes the 4 separate 32 bit float RGBA planes and interleaves them into a single 8 bit per channel RGBA image – optionally multiplying the RGB by the alpha.
| nPixels | The count of the pixels to be processed |
| r | Pointer to the Red plane |
| g | Pointer to the Green plane |
| b | Pointer to the Blue plane |
| a | Pointer to the Alpha plane (can be null – then all alphas are assumed to be opaque) |
| target | Pointer to the target RGBA image |
| multAlpha | true if this function is to multiply the aAlpha into the RGB channels (defaults to true) |