Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// Load an existing PSD image as Image
using (PsdImage image = (PsdImage)Image.Load("Photoshop.psd"))
{
LayerGroup formats = (LayerGroup)image.Layers[1];
formats.Save("formats.png", new PngOptions());
Console.ReadKey();
}
// Load an existing PSD image as Image
using (Image image = Image.Load("Photoshop.psd"))
{
// Create an instance of BmpOptions class
BmpOptions options = new BmpOptions();
// Convert PSD to BMP
image.Save("PSD-to-BMP.bmp", options);
}
// Load an existing PSD image as Image
using (Image image = Image.Load("Photoshop.psd"))
{
// Create an instance of GifOptions class
GifOptions options = new GifOptions();
// Convert PSD to GIF
image.Save("PSD-to-GIF.gif", options);
}
// Load an existing PSD image as Image
using (Image image = Image.Load("Photoshop.psd"))
{
// Create an instance of Jpeg2000Options class
Jpeg2000Options options = new Jpeg2000Options();
// Convert PSD to JP2
image.Save("PSD-to-JP2.jp2", options);
}
// Load an existing PSD image as Image
using (Image image = Image.Load("Photoshop.psd"))
{
// Create an instance of JpegOptions class
JpegOptions jpegOptions = new JpegOptions();
jpegOptions.Quality = 100;
// Convert PSD to JPG
image.Save("PSD-to-JPG.jpeg", jpegOptions);
}
// Load an existing PSD image as Image
using (Image image = Image.Load("Photoshop.psd"))
{
// Create an instance of PdfOptions class
PdfOptions options = new PdfOptions();
// Convert PSD to PDF
image.Save("PSD-to-PDF.PDF", options);
}
// Load an existing PSD image as Image
using (Image image = Image.Load("Photoshop.psd"))
{
// Create an instance of PngOptions class
PngOptions pngOptions = new PngOptions();
// Convert PSD to PNG
image.Save("PSD-to-PNG.PNG", pngOptions);
}
// Load an existing PSD image as Image
using (Image image = Image.Load("Photoshop.psd"))
{
// Create an instance of TiffOptions class
TiffOptions options = new TiffOptions(FileFormats.Tiff.Enums.TiffExpectedFormat.Default);
// Convert PSD to Tiff
image.Save("PSD-to-Tiff.tiff", options);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.