Aspose.PSD
22.9.0
See the version list below for details.
dotnet add package Aspose.PSD --version 22.9.0
NuGet\Install-Package Aspose.PSD -Version 22.9.0
<PackageReference Include="Aspose.PSD" Version="22.9.0" />
paket add Aspose.PSD --version 22.9.0
#r "nuget: Aspose.PSD, 22.9.0"
// Install Aspose.PSD as a Cake Addin #addin nuget:?package=Aspose.PSD&version=22.9.0 // Install Aspose.PSD as a Cake Tool #tool nuget:?package=Aspose.PSD&version=22.9.0
PSB to PNG converter on-premise .NET API
Product Page | Docs | Demos | API Reference | Examples | Blog | Search | Free Support | Temporary License
A standalone .NET API to read, write, process & convert Adobe Photoshop PSD & PSB formats without needing to install Adobe Photoshop®.
Aspose.PSD for .NET API allows you to create and edit the Photoshop files as well as provides the ability to update layer properties, add watermarks, perform graphics operations and convert one file format to another.
Photoshop File Processing Features
- Create Photoshop PSD & PSB files via API.
- Export PSD images to popular image formats.
- Binarization with fixed & Otsu threshold.
- Convert GIF image layers to TIFF & CMYK PSD to CMYK TIFF.
- Combine, expand, or crop images.
- Create, read, and write XMP data.
- Set default font as a replacement for all the missing fonts.
- Apply Median & Wiener filters to reduce image noise.
- Transform images to black-n-white or grayscale.
- Crop images by shifts or rectangle.
- Rotate an image at a specific angle
- Perform simple image resize, or by image proportions.
- Support for dithering of raster images.
- Adjust image brightness, contrast, and gamma.
- Implement Lossy GIF Compression & Bicubic Resampling.
- Color Balance or invert Adjustment Layer.
- Draw basic objects such as lines, Ellipse, Rectangle, Arc, Bezier.
What's new in v22.9.0
PSB
to PNG
Conversion
Convert Photoshop® large document PSB
(Photoshop Big) file format to PNG
(Portable Network Graphic) raster image format.
string sourcePsdFile = "input.psb";
string outputImageFile = "output.png";
using (var image = (PsdImage)Image.Load(sourcePsdFile))
{
// Here should be no exception.
image.Save(outputImageFile, new PngOptions() { ColorType = PngColorType.GrayscaleWithAlpha });
}
Apply Timeline layer state to PSD
layers
Use C# code to apply layer state to layers within the timeline of PSD
image.
string sourceFile = "3_animated.psd";
string outputPsd = "output.psd";
string outputPng = "output.png";
using (var psdImage = (PsdImage)Image.Load(sourceFile, new PsdLoadOptions() { LoadEffectsResource = true }))
{
TimeLine timeLine = TimeLine.InitializeFrom(psdImage);
var layerIds = timeLine.LayerIds;
var layerState11 = timeLine.Frames[1].LayerStates[layerIds[1]];
timeLine.Frames[1].LayerStates[layerIds[1]].StateEffects.AddPatternOverlay();
layerState11.BlendMode = BlendMode.Multiply;
// Change active frame from 0 to 1 to activate applying of LayerState to Layer
timeLine.ActiveFrame = 1;
// Apply changes to PsdImage
timeLine.ApplyTo(psdImage);
psdImage.Save(outputPsd);
psdImage.Save(outputPng, new PngOptions());
}
Graphic Processing without any Memory Leak
Avoid memory leakage while processing graphic files, such as PSD
.
string[] filesToLoad = new string[] { "testPsd0.psd", "testPsd1.psd", "testPsd2.psd" };
int inputNumber = GC.MaxGeneration;
#if NETCOREAPP
GCSettings.LargeObjectHeapCompactionMode = GCLargeObjectHeapCompactionMode.CompactOnce;
#endif
GC.Collect(inputNumber, GCCollectionMode.Forced);
GC.WaitForFullGCComplete();
double memCount = (double)Process.GetCurrentProcess().PrivateMemorySize64 / 1024 / 1024;
Console.WriteLine("Total used bytes before test: {0:N2} MiB", memCount);
double max = memCount;
for (int i = 0; i < 50; i++)
{
int fileIndex = i % inputNumber;
string sourceFile = Path.Combine(baseFolder, filesToLoad[fileIndex]);
// CheckOpenSaving
using (MemoryStream outputStream = new MemoryStream())
{
using (PsdImage psd = (PsdImage)Image.Load(sourceFile, new PsdLoadOptions { LoadEffectsResource = true }))
{
psd.Save(outputStream, new JpegOptions() { Quality = 100 });
}
}
#if NETCOREAPP
GCSettings.LargeObjectHeapCompactionMode = GCLargeObjectHeapCompactionMode.CompactOnce;
#endif
GC.Collect(inputNumber, GCCollectionMode.Forced);
GC.WaitForFullGCComplete();
memCount = (double)Process.GetCurrentProcess().PrivateMemorySize64 / 1024 / 1024;
max = Math.Max(max, memCount);
}
memCount = (double)Process.GetCurrentProcess().PrivateMemorySize64 / 1024 / 1024;
Console.WriteLine("Total used bytes after test: {0:N2} MiB", memCount);
Assert.IsTrue(Math.Abs(memCount - max) < 20, "Memory leak in base functionality found!");
For a complete list of features, enhancements, and bug fixed in this release please visit, Aspose.PSD for .NET 22.9 - Release Notes.
Read & Write Photoshop Formats
Adobe Photoshop: PSD, PSB
Save Photoshop Files As
Raster Formats: TIFF, JPEG, PNG, GIF, BMP, JPEG2000
Fixed Layout: PDF
Read Formats
Adobe Illustrator: AI
Platform Independence
Aspose.PSD for .NET can work in any environment that supports .NET framework 2.0 or above.
Get Started
Are you ready to give Aspose.PSD for .NET a try? Simply execute Install-Package Aspose.PSD
from Package Manager Console in Visual Studio to fetch the NuGet package. If you already have Aspose.PSD for .NET and want to upgrade the version, please execute Update-Package Aspose.PSD
to get the latest version.
Crop a PhotoShop PSD to Save Result in PNG format
You can execute the below code snippet to see how Aspose.PSD API works in your own development environment or check the GitHub Repository for other common usage scenarios.
// implement correct Crop method for PSD files.
using (RasterImage image = Image.Load(dir + "template.psd") as RasterImage)
{
image.Crop(new Rectangle(10, 30, 100, 100));
image.Save(dir + "output.png", new PngOptions() { ColorType = PngColorType.TruecolorWithAlpha });
}
Draw Rectangles in a PSD Image
// create an instance of Image
using (Image image = new PsdImage(100, 100))
{
Graphics graphic = new Graphics(image);
graphic.Clear(Color.Yellow);
// draw a rectangle with Pen tool
graphic.DrawRectangle(new Pen(Color.Red), new Rectangle(30, 10, 40, 80));
// draw another rectangle with Solid Brush in Blue color
graphic.DrawRectangle(new Pen(new SolidBrush(Color.Blue)), new Rectangle(10, 30, 80, 40));
}
Product Page | Docs | Demos | API Reference | Examples | Blog | Search | Free Support | Temporary License
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net20 is compatible. net35 is compatible. net35-client is compatible. net40 is compatible. net40-client is compatible. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 2.0
- No dependencies.
-
.NETFramework 3.5
- No dependencies.
-
.NETFramework 3.5 Client
- No dependencies.
-
.NETFramework 4.0
- No dependencies.
-
.NETFramework 4.0 Client
- No dependencies.
-
.NETStandard 2.0
- System.Drawing.Common (>= 4.7.0)
- System.Text.Encoding.CodePages (>= 4.7.0)
-
net5.0
- System.Drawing.Common (>= 5.0.0)
- System.Text.Encoding.CodePages (>= 5.0.0)
-
net6.0
- System.Drawing.Common (>= 6.0.0)
- System.Text.Encoding.CodePages (>= 6.0.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Aspose.PSD:
Package | Downloads |
---|---|
Aspose.Total
Aspose.Total for .NET is the most complete package of all .NET file format APIs offered by Aspose. It empowers developers to create, edit, render, print and convert between a wide range of popular document formats within any .NET, C#, ASP.NET and VB.NET applications. |
|
Weavy.Core
A class library containing core business logic, data access and utility methods required by Weavy. |
|
Aspose.PSD.Adapters.Imaging
Aspose.PSD Imaging Adapter for .NET provides time-saving integration with Aspose.Imaging to open or export additional formats and work with them in Adobe Photoshop Style using layers, effects, warp transformations without requiring Adobe Photoshop or Adobe Illustrator. Aspose.PSD has limitation on loading of additional Raster and Vector Formats. They can be only loaded as layers. If you have both Aspose.PSD and Aspose.Imaging licenses or you are user of Aspose.Total this package can save your time and efforts on integration of these products. With Aspose.PSD.Adapters.Imaging you can open in Aspose.PSD any formats like SVG, WEBP, TIFF, PNG, JPEG, GIF, JPEG2000, BMP and edit them like PSD without additional code. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
24.11.0 | 12,637 | 11/11/2024 |
24.10.0 | 4,082 | 10/14/2024 |
24.9.0 | 13,985 | 9/23/2024 |
24.8.0 | 27,020 | 8/14/2024 |
24.7.0 | 16,605 | 7/11/2024 |
24.6.0 | 25,279 | 6/6/2024 |
24.5.0 | 13,691 | 5/17/2024 |
24.4.0 | 18,118 | 4/16/2024 |
24.3.0 | 10,563 | 3/26/2024 |
24.2.0 | 12,504 | 3/13/2024 |
24.1.0 | 21,680 | 2/5/2024 |
23.12.0 | 21,069 | 1/3/2024 |
23.11.0 | 26,743 | 11/30/2023 |
23.10.0 | 15,046 | 11/13/2023 |
23.9.0 | 21,707 | 10/5/2023 |
23.8.0 | 19,318 | 9/1/2023 |
23.7.0 | 14,848 | 7/24/2023 |
23.6.0 | 9,310 | 6/23/2023 |
23.5.0 | 6,938 | 5/29/2023 |
23.4.0 | 8,095 | 4/18/2023 |
23.3.0 | 8,750 | 3/24/2023 |
23.2.0 | 12,063 | 2/22/2023 |
23.1.0 | 15,854 | 1/30/2023 |
22.12.0 | 13,616 | 12/13/2022 |
22.11.0 | 10,153 | 11/10/2022 |
22.10.0 | 27,473 | 9/28/2022 |
22.9.0 | 3,114 | 9/1/2022 |
22.8.0 | 27,509 | 7/27/2022 |
22.7.0 | 8,993 | 7/4/2022 |
22.6.0 | 14,950 | 6/1/2022 |
22.5.0 | 21,410 | 5/4/2022 |
22.4.0 | 15,448 | 4/4/2022 |
22.3.0 | 21,469 | 2/28/2022 |
22.2.0 | 3,087 | 2/1/2022 |
22.1.0 | 10,795 | 12/28/2021 |
21.12.0 | 2,102 | 12/6/2021 |
21.11.0 | 14,798 | 10/29/2021 |
21.10.0 | 15,535 | 9/30/2021 |
21.9.0 | 6,670 | 9/10/2021 |
21.8.0 | 13,370 | 8/6/2021 |
21.7.0 | 26,212 | 7/14/2021 |
21.6.0 | 13,270 | 6/9/2021 |
21.5.0 | 9,737 | 5/13/2021 |
21.4.0 | 18,150 | 4/30/2021 |
21.3.0 | 17,691 | 3/29/2021 |
21.2.0 | 10,634 | 2/25/2021 |
21.1.0 | 1,456 | 1/29/2021 |
20.12.0 | 4,207 | 12/31/2020 |
20.11.0 | 8,353 | 12/1/2020 |
20.10.0 | 9,771 | 10/22/2020 |
20.9.0 | 1,800 | 9/30/2020 |
20.8.0 | 3,156 | 8/31/2020 |
20.7.0 | 2,586 | 7/30/2020 |
20.6.0 | 2,756 | 6/29/2020 |
20.5.0 | 2,602 | 5/28/2020 |
20.4.0 | 12,723 | 4/27/2020 |
20.3.0 | 2,329 | 3/31/2020 |
20.2.0 | 5,205 | 2/25/2020 |
19.12.0 | 6,647 | 12/12/2019 |
19.11.0 | 1,371 | 11/29/2019 |
19.10.0 | 1,385 | 10/29/2019 |
19.9.0 | 1,164 | 9/26/2019 |
19.8.0 | 11,550 | 8/30/2019 |
19.7.0 | 1,164 | 8/12/2019 |
19.6.0 | 1,224 | 7/15/2019 |
19.5.0 | 1,520 | 5/20/2019 |
19.4.0 | 1,377 | 4/16/2019 |
19.3.0 | 1,350 | 3/15/2019 |
19.2.0 | 2,141 | 2/14/2019 |
18.12.0 | 1,397 | 12/7/2018 |
18.10.0 | 1,669 | 10/4/2018 |
18.8.0 | 1,547 | 8/13/2018 |