public static void Run()
{
// ExStart:UncompressedImageUsingFile
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_PSD();
// First convert the image to raw PSD format.
using (PsdImage psdImage = (PsdImage)Image.Load(dataDir + "PsdImage.psd"))
{
PsdOptions saveOptions = new PsdOptions();
saveOptions.CompressionMethod = CompressionMethod.Raw;
psdImage.Save(dataDir + "uncompressed_out.psd", saveOptions);
}
// Now reopen the newly created image.
using (PsdImage psdImage = (PsdImage)Image.Load(dataDir + "uncompressed_out.psd"))
{
Graphics graphics = new Graphics(psdImage);
// Perform graphics operations.
}
// ExEnd:UncompressedImageUsingFile
}
}