Working With PSB Files
Converting PSB File to JPEG
Using Aspose.PSD for .NET, developers can convert PSB file format to JPEG file format. This topic explains the approach to load existing PSB file and convert it to JPEG file format.
// For complete examples and data files, please go to https://github.com/aspose-psd/Aspose.PSD-for-.NET | |
string[] sourceFileNames = new string[] { | |
//Test files with layers | |
"Little", | |
"Simple", | |
//Test files without layers | |
"psb", | |
"psb3" | |
}; | |
var options = new PsdLoadOptions(); | |
foreach (var fileName in sourceFileNames) | |
{ | |
var sourceFileName = dataDir + fileName + ".psb"; | |
using (PsdImage image = (PsdImage)Image.Load(sourceFileName, options)) | |
{ | |
// All jpeg and psd files must be readable | |
image.Save(dataDir + fileName + "_output.jpg", new JpegOptions() { Quality = 95 }); | |
image.Save(dataDir + fileName + "_output.psb"); | |
} | |
} |
Converting PSB File to PSD
Using Aspose.PSD for .NET, developers can convert PSB to PSD file format. This article shows how to export/convert PSB file to PSD format with Aspose.PSD. Aspose.PSD for .NET provides the Load method exposed by Image class to load PSB files and same can be used to save the results. The following code snippet shows you how to convert PSB to PSD file.
// For complete examples and data files, please go to https://github.com/aspose-psd/Aspose.PSD-for-.NET | |
string sourceFilePathPsb = dataDir + "2layers.psb"; | |
string outputFilePathPsd = dataDir + "ConvertFromPsb.psd"; | |
using (Image img = Image.Load(sourceFilePathPsb)) | |
{ | |
var options = new PsdOptions((PsdImage)img) { PsdVersion = PsdVersion.Psd }; | |
img.Save(outputFilePathPsd, options); | |
} |
Using Aspose.PSD for .NET, developers can convert PSB to PDF file format. This article shows how to export/convert PSB file to PDF format with Aspose.PSD. Aspose.PSD for .NET provides the Load method exposed by Image class to load PSB files and same can be used to save the results. The PdfOptions class provides options for creating the PDF such as PageSize, JpegQuality and others. These options can be used to get the desired standard of PDF.
Converting PSB File to PDF
The following code snippet shows you how to convert PSB to PDF file
// For complete examples and data files, please go to https://github.com/aspose-psd/Aspose.PSD-for-.NET | |
string sourceFileName = dataDir + "Simple.psb"; | |
using (PsdImage image = (PsdImage)Image.Load(sourceFileName)) | |
{ | |
string outFileName = dataDir + "Simple.pdf"; | |
image.Save(outFileName, new PdfOptions()); | |
} |