Skip to main content

PSD, PSB, AI Manipulation API

Product Page | Documentation | Demos | Blog | API Reference | Search | Free Support | Temporary License | EULA


Try our free online Apps demonstrating some of the most popular Aspose.PSD functionality.

Aspose.PSD for Python via .NET is an Unique Python PSD Library offering advanced PSD, PSD and AI files processing features. You could easily create, load, update, edit, convert, compress PSD and PSB images using this API. Aspose.PSD Supports most popular features for PSD and PSB files including updates of Text Layers, Smart Objects, Fill Layers, Shape Layers, Group Layers, Adjustment Layers. Aspose.PSD supports Blendings Modes, Layer Effects, Warp Transformations, Smart Filters, Animation TimeLine, Working with Vector, Raster and Clipping Masks, Low-Level PSD file resource exploring and much more. Also, library supports drawing and work with graphic primitives for Regular Layers. Aspose.PSD is able to export and convert PSD, PSB, AI formats to PNG, TIFF, PDF, JPEG, GIF, BMP. IT supports popular combinations of Bit Depths and Color Modes. Besides the all described a many common tranformation like Layer Resize, Crop, Shift, Rotating are supported too. This is an ultimate PSD, PSB and AI Format Processing Library for any use-cases. It's crossplatform: Windows, MacOS, MacOS-ARM, Linux are supported.

Aspose.PSD for Python via .NET is an ultimate, flexible, stable and powerful API to work with PSD, PSB and AI formats. Aspose.PSD is cross-platform library, it is Windows x32/x64, Linux x64, and MacOS x64/Arm64 compatible.

Aspose.PSD for Python requires you to use python programming language. For Java and .NET languages, we recommend you to get Aspose.PSD for Java and Aspose.PSD for .NET, respectively.

Product Features

The following are Aspose.PSD’s core features:

  • Create PSD and PSB images from scratch
  • Open and Export of PSD, PSB and AI images to PDF, JPEG, PNG, TIFF, BMP, GIF, BMP
  • Aspose.PSD Team actively work on manipulation with AI files
  • Update PSD and PSB images
  • Adding of JPEG, PNG, TIFF, BMP, GIF, BMP files as a layers for editing
  • Support of layers: Regular Layer, Text Layer, Smart Object, Group Layer, Adjustment Layer, Fill Layer, Shape Layer
  • Support of Blending Options, Layer Effects, Raster, Vector andd Clipping Masks, Warp Transformations, Smart Filters
  • Draw lines, circles, ellipses, texts, complex paths, and images using the classes Graphics
  • Process images (including per-pixel modifications)
  • Convert PSD and PSB Files between different Color Modes and Bit Depths

Supported File Formats

File format Load Save Add as a Layer
PSD Yes Yes Yes
PSB Yes Yes Yes
AI Yes Working on it Yes
BMP - Yes Yes
GIF - Yes Yes
JPEG - Yes Yes
JPEG2000 - Yes Yes
PNG - Yes Yes
TIFF - Yes Yes
PDF -  Yes Working on it

Platform Independence

Aspose.PSD for Python can be used to develop applications for a wide range of operating systems, such as Windows (x32/x64), Linux (x64), and MacOS (x64/arm64) where Python 3.5 or later is installed.

The base .NET platform is .NET Core 6.0 Do not use System.Drawing.Common but the platform-independent Aspose.Drawing.

Get Started

Ready to give Aspose.PSD for Python a try?

Simply run pip install aspose-psd from the console to fetch the package. If you already have Aspose.PSD for Python and want to upgrade the version, please run pip install --upgrade aspose-psd to get the latest version.

You can run the following snippets in your environment to see how Aspose.PSD works, or check out the GitHub Repository or Aspose.PSD for Python Documentation for other common use cases.

Open PSD File in Python and update text

from aspose.psd import Image
from aspose.psd.fileformats.png import PngColorType
from aspose.psd.fileformats.psd import PsdImage
from aspose.psd.fileformats.psd.layers import TextLayer
from aspose.psd.imageloadoptions import PsdLoadOptions
from aspose.psd.imageoptions import PngOptions
from aspose.pycore import cast

# Specify File Paths
sourceFile = "AllTypesLayerPsd.psd"
outputFile = "LoadImageExample.png"

# Specify Load Options
loadOptions = PsdLoadOptions()
loadOptions.load_effects_resource = True
loadOptions.allow_warp_repaint = True

# Specify Export Options
exportOptions = PngOptions()
exportOptions.color_type = PngColorType.TRUECOLOR_WITH_ALPHA

# Open File using Aspose.PSD for Python
with Image.load(sourceFile, loadOptions) as image:
    # Types of Aspose.PSD can be casted
    psdImage = cast(PsdImage, image)
    textLayer = cast(TextLayer, psdImage.layers[5])
    textLayer.update_text("Simple Text Edit")

    # Export PSD File To PNG
    psdImage.save(outputFile, exportOptions)
	

Create a PSD File From Scratch. Create Regular Layer using Graphics API and Create Text Layer with Shadow Effect

from aspose.psd import Graphics, Pen, Color, Rectangle
from aspose.psd.brushes import LinearGradientBrush
from aspose.psd.fileformats.psd import PsdImage

outputFile = "CreateFileFromScratchExample.psd"

# Create PSD Image with specified dimensions
with PsdImage(500, 500) as img:
    # Create Regular PSD Layer and update it with Graphic API
    regularLayer = img.add_regular_layer()

    # Use popular Graphic API for Editing
    graphics = Graphics(regularLayer)
    pen = Pen(Color.alice_blue)
    brush = LinearGradientBrush(Rectangle(250, 250, 150, 100), Color.red, Color.aquamarine, 45)
    graphics.draw_ellipse(pen, Rectangle(100, 100, 200, 200))
    graphics.fill_ellipse(brush, Rectangle(250, 250, 150, 100))

    # Create Text Layer
    textLayer = img.add_text_layer("Sample Text", Rectangle(200, 200, 100, 100))

    # Adding Shadow to Text
    dropShadowEffect = textLayer.blending_options.add_drop_shadow()
    dropShadowEffect.distance = 0
    dropShadowEffect.size = 8
    dropShadowEffect.color = Color.blue

    # Save PSD File
    img.save(outputFile)

Add Image File as a Layer or Open Image File as a PSD

from io import BytesIO
from aspose.psd.fileformats.psd import PsdImage
from aspose.psd.fileformats.psd.layers import Layer

inputFile = "inputFile.png"
outputFile = "AddFileAsLayer.psd"

# Open file as Stream
with open(inputFile, "rb", buffering=0) as filestream:
    stream = BytesIO(filestream.read())
    stream.seek(0)

    # Create PSD Layer from Stream
    layer = Layer(stream)

    # Create PSD Image with the specified size
    psdImage = PsdImage(layer.width, layer.height)

    # Add Layer to PSD Image
    psdImage.layers = [layer]

    # Get Pixels from File
    pixels = layer.load_argb_32_pixels(layer.bounds)
    pixelsRange = range(len(pixels))

    # Fill the pixels data with some values
    for i in pixelsRange:
        if i % 5 == 0:
            pixels[i] = 500000

    # Fast Save of Updated Image Data
    layer.save_argb_32_pixels(layer.bounds, pixels)

    # Save PSD Image
    psdImage.save(outputFile)

Set License Example

from aspose.psd import License

license = License()
licensePath = "PathToLicenseFile"
license.set_license(licensePath)
    

Product Page | Documentation | Demos | Blog | API Reference | Search | Free Support | Temporary License | EULA

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

aspose_psd-26.8.0-py3-none-win_amd64.whl (59.2 MB view details)

Uploaded Python 3Windows x86-64

aspose_psd-26.8.0-py3-none-win32.whl (50.4 MB view details)

Uploaded Python 3Windows x86

aspose_psd-26.8.0-py3-none-manylinux1_x86_64.whl (85.9 MB view details)

Uploaded Python 3

aspose_psd-26.8.0-py3-none-macosx_11_0_arm64.whl (58.2 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

aspose_psd-26.8.0-py3-none-macosx_10_14_x86_64.whl (76.6 MB view details)

Uploaded Python 3macOS 10.14+ x86-64

File details

Details for the file aspose_psd-26.8.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: aspose_psd-26.8.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 59.2 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for aspose_psd-26.8.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 b38ca97320d7b62601871bb4bb52c986b97fbfb4b1e61eff16bf0902d069e954
MD5 46adcdb81a22a459eff6f8de3e761ab3
BLAKE2b-256 11ad752a3b279fd6ff9a1a0e0d1dad77ec24d464da2199ff42326249f9e6846b

See more details on using hashes here.

File details

Details for the file aspose_psd-26.8.0-py3-none-win32.whl.

File metadata

  • Download URL: aspose_psd-26.8.0-py3-none-win32.whl
  • Upload date:
  • Size: 50.4 MB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for aspose_psd-26.8.0-py3-none-win32.whl
Algorithm Hash digest
SHA256 99d521a7c598cd3904f783c1f177df0441bbf945170102b47ca045540c19a4f7
MD5 53a7ad6c278afa9b1e5ed761aed9f4b7
BLAKE2b-256 139ec02d4d3d9cbbe94b1bcae95e5527aac565c1163cd438264babed9a7a3ee3

See more details on using hashes here.

File details

Details for the file aspose_psd-26.8.0-py3-none-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for aspose_psd-26.8.0-py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 09f9184e07e740f460dfedcb003bc8dd06d3ca477101f243fe4e845686c7cb7d
MD5 b155258af697fbc76b2626fc82a05906
BLAKE2b-256 eb6f42eb5336504b21757d3f47c879431c56f68050c2e2ccac1193721d2ec178

See more details on using hashes here.

File details

Details for the file aspose_psd-26.8.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for aspose_psd-26.8.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9d7f12bfa65587984e7f85d6326cf083f82b380cca54423390470466daa69039
MD5 17b98fd731f0ce0732b3afe0d5201fcc
BLAKE2b-256 72f0b3668b83c1d322838abf17a50213f02af51770d8c334699dfa7654564078

See more details on using hashes here.

File details

Details for the file aspose_psd-26.8.0-py3-none-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for aspose_psd-26.8.0-py3-none-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 83de71c11d1f7bda5b16a68854ded68b9ac83bc8a8cfb8404847378662d62a61
MD5 a3a411437ab7406aae071758bed6dce2
BLAKE2b-256 a0de4a78800a44abc6d3a7fb61fa6426e7ea14d79ed9b828143623de895f6fcf

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

26.8.0 This release

5 files

26.7.0

5 files

26.6.0

5 files

26.5.0

5 files

26.4.0

5 files

26.3.0

4 files

26.2.0

4 files

26.1.0

5 files

25.12.0

5 files

25.11.0

5 files

25.10.0

5 files

25.9.0

5 files

25.8.0

5 files

25.7.0

5 files

25.6.0

5 files

25.5.0

5 files

25.4.0

5 files

25.3.0

5 files

25.2.0

5 files

25.1.0

5 files

24.12.0

5 files

24.11.0

5 files

24.10.0

5 files

24.9.0

5 files

24.8.0

5 files

24.7.0

5 files

24.6.0

5 files

24.5.0

5 files

24.4.0

5 files

24.3.0

5 files

24.2.0

5 files

24.1.0

5 files

23.12.0

5 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page