Enum PsdColorMode
A PSD color mode, by its code in the file header.
public enum PsdColorMode
Fields
Bitmap = 01-bit black and white (0), loaded as Gray8.
Cmyk = 4Cyan, magenta, yellow, black (4).
Duotone = 8Gray printed with up to four inks (8); loaded as gray, the inks kept in ColorModeData.
Grayscale = 1Gray (1).
Indexed = 2Indices into a 256-color table (2), loaded as RGB.
Lab = 9CIE Lab* (9), converted to sRGB on load.
Multichannel = 7Several inks with no fixed meaning (7); the first is loaded as gray.
Rgb = 3Red, green, blue (3).
Examples
using Raster image = Raster.Load("photo.psd");
var details = (PsdDetails)image.Metadata.FormatDetails!;
Console.WriteLine($"{(details.Version == 2 ? "PSB" : "PSD")}, {details.ColorMode} at {details.BitsPerChannel} bits, {details.ChannelCount} channels, {details.Compression}");
if (!details.HasRealComposite)
{
// Saved without Maximize Compatibility: what loaded is Photoshop's placeholder, and a warning says so.
Console.WriteLine("Save the file again with Maximize Compatibility on.");
}
foreach (PsdResource resource in details.OtherResources)
{
Console.WriteLine($"Resource {resource.Id}, {resource.Data.Length} bytes");
}