Mudbox/LibPSD.h File Reference

LibPSD.h File Reference
#include <stdlib.h>
#include <stdio.h>
#include <vector>

Classes

struct  BlendChannelInfo
 
struct  SectionDividerSetting
 
struct  AdditionalLayerInfo
 
struct  RESOLUTIONINFO
 
struct  LAYERSTATE
 
struct  IMAGERESOURCES
 
struct  PSD_FILE_HEADER
 
class  LRect
 
class  ChannelInfo
 
class  PSDLayerMeta
 The PSDLayerMeta object contains informations about a layer. More...
 
class  PSDFileMeta
 The PSDFileMeta object contains meta data about the psd file, such header information, the number of layers, etc... More...
 

Namespaces

 adsk
 
 adsk::libPSD
 

Enumerations

enum  PSDBlendMode {
  blendNORMAL = 0, blendMULTIPLY, blendDARKEN, blendDIFFERENCE,
  blendEXCLUSION, blendHARDLIGHT, blendCOLORDODGE, blendLIGHTEN,
  blendSCREEN, blendCOLORBURN, blendOVERLAY, blendHUE,
  blendSATURATION, blendLUMINOSITY, blendCOLOR, blendDISSOLVE,
  blendSOFTLIGHT, blendLINEARDODGE, blendVIVIDLIGHT, blendLINEARBURN,
  blendLINEARLIGHT, blendPINLIGHT, blendHARDMIX, blendDARKERCOLOR,
  blendLIGHTERCOLOR, blendSUBTRACT, blendDIVIDE, blendUNKNOW
}
 
enum  PSDError {
  PSD_SUCCESS = 0, PSD_FAIL, PSD_MEMORY_FAILURE, PSD_ERROR_OPENING_FILE,
  PSD_FOPEN_FAIL, PSD_FILE_NOT_PSD, PSD_READ_ERROR, PSD_WRITE_ERROR,
  PSD_WRONG_VERSION, PSD_NO_INSTANCE, PSD_INDEX_OUT_OF_RANGE, PSD_FILE_HEADER_NOT_VALID,
  PSD_PSDFILE_ERROR, PSD_INVALID_LAYER, PSD_CHANNEL_INDEX_OUT_OF_RANGE, PSD_LAYER_INDEX_OUT_OF_RANGE,
  PSD_DECOMPRESSION_ERROR, PSD_BITDEPTH_ERROR
}
 
enum  CompressionMethod {
  PSD_COMPRESSION_NONE = -1, PSD_COMPRESSION_RAW, PSD_COMPRESSION_RLE, PSD_COMPRESSION_ZIP,
  PSD_COMPRESSION_ZIP_PREDICTION
}
 
enum  layerType { LAYER_NORMAL = 0, LAYER_SET_OPEN, LAYER_SET_CLOSED, LAYER_DIVIDER }
 

Functions

PSDFile MBDLL_DECLPSDOpen (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...
 

Variables

static const char * PSDErrorString []
 

Variable Documentation

const char* PSDErrorString[]
static
Initial value:
= {
"PSD_SUCCESS",
"PSD_FAIL",
"PSD_MEMORY_FAILURE",
"PSD_ERROR_OPENING_FILE",
"PSD_FOPEN_FAIL",
"PSD_FILE_NOT_PSD",
"PSD_READ_ERROR",
"PSD_WRITE_ERROR",
"PSD_WRONG_VERSION",
"PSD_NO_INSTANCE",
"PSD_INDEX_OUT_OF_RANGE",
"PSD_FILE_HEADER_NOT_VALID",
"PSD_PSDFILE_ERROR",
"PSD_INVALID_LAYER",
"PSD_CHANNEL_INDEX_OUT_OF_RANGE",
"PSD_LAYER_INDEX_OUT_OF_RANGE",
"PSD_DECOMPRESSION_ERROR",
"PSD_BITDEPTH_ERROR"
}

Definition at line 8 of file LibPSD.h.

Go to the source code of this file.