The LAYERINFO structure describes the layer position within a file.
Size of this structure. Use sizeof (LAYERINFO).
Left layer position.
Top layer position.
Opacity value of the layer. Possible values are between 0 and 255, where a value of 0 is completely transparent and a value of 255 is completely opaque. For more information, refer to the FILE FORMATS SPECIFICATION from Adobe.
Clipping value for the layer. A value of 0 represents base. A value of 1 represents non-base. For more information, refer to the FILE FORMATS SPECIFICATION from Adobe.
A four byte character array that represents the blend mode key for the layer. Possible values are:
Pointer to a bitmap handle that references the bitmap of the transparency mask channel of the saved layer. This is an 8-bit grayscale bitmap. The value of each pixel indicates the amount of transparency the data of the original bitmap has at this point. For example, if the value is 0xFF at a certain point, the pixel value of the layer bitmap at that point is not transparent at all. If the value was 0x00, the pixel value of the layer bitmap at that point is fully transparent. If the value is between these two, it indicates the degree of transparency the pixel value of the layer bitmap has at that point.
When loading, this variable must be a pointer to a BITMAPHANDLE, which is not allocated. The load function will allocate this bitmap and it is up to the user to free this bitmap.
If the mask bitmap does not need to be loaded, pass NULL. Passing NULL saves the transparency mask as a full white bitmap, which represents full visibility of the layer.
When saving, if this is a valid bitmap, then it should be of the same width & height as the corresponding layer bitmap. It should also be an 8-bit grayscale bitmap.
For more information, refer to FILE FORMATS SPECIFICATION from Adobe.
Null-terminated characters string that contains the layer name.
Flags that provide information about the layer. This member is filled when the layer is loaded. Possible values are:
|LAYERINFO_TRANSPARENCYPROTECTED||The PSD layer transparency data is locked.|
|LAYERINFO_VISIBLE||The PSD layer is visible.|
|LAYERINFO_OBSOLETE||The PSD layer is obsolete.|
|LAYERINFO_PSD5ORLATER||The layer is PSD is generated or modified using Photoshop 5 or later.|
pLAYERINFO is a pointer to a LAYERINFO structure. Where the function parameter type is pLAYERINFO, declare a LAYERINFO variable, update the structure's fields, and pass the variable's address in the parameter. Declaring a pLAYERINFO variable is necessary only if the program requires a pointer.
Some functions which take this structure as a parameter require that the structure be initialized prior to the function call. You must set the uStructSize member to the total size, in bytes, of the structure. Use the sizeof() operator to calculate this value. Functions that do not require the structure be initialized will take the total size of the structure, in bytes, as an additional function parameter.
Usually layers start in the top-left position of the image, so nLayerLeft and nLayerTop are 0 most of the time.
Medical Web Viewer .NET
.NET, Java, Android, and iOS/macOS Assemblies
C API/C++ Class Libraries