Develop high-performance Python applications with advanced image processing features using Aspose.Imaging for Python via .NET 24.8 on Windows x64. The latest version includes features like image loading from URLs, Python 3.12 support, and more.
Python 3.12 Support
Seamlessly incorporate advanced Python 3.12 functionalities into your apps as a part of the broader image manipulation capabilities in Aspose.Image for Python via .NET API.
Loading Images from URLs in Python Applications
Experience flexibility in image loading within your applications using the newly added ability to load images directly from URLs. You can work with remote image resources and avoid hosting image files locally with this feature.
Code Example:
from aspose.imaging import Image, FileFormat
with Image.load("https://docs.aspose.com/imaging/net/home_1.png") as image:
assert image.file_format == FileFormat.PNG
Source*
TIFF Image Handling Boost
The Python imaging API now supports optimized multi-frame TIFF image saving and prevents NullReferenceExceptions
that occurred in the previous versions. This update ensures reliable TIFF image handling on Windows 64-bit machines.
Code Example:
from aspose.pycore import as_of
from aspose.imaging.fileformats.tiff import TiffImage, TiffFrame
from aspose.imaging.fileformats.tiff.enums import TiffExpectedFormat
from aspose.imaging.sources import StreamSource
from aspose.imaging import Image
from aspose.imaging.imageoptions import TiffOptions
tiffOptions = TiffOptions(TiffExpectedFormat.TIFF_LZW_RGBA)
tiffOptions.source = StreamSource()
pixels = [0] * 2500
with as_of(Image.create(tiffOptions, 50, 50), TiffImage) as image:
image.save_argb_32_pixels(image.bounds, pixels)
image.save()
for i in range(7):
newImageOptions = tiffOptions.clone()
newImageOptions.source = StreamSource()
with as_of(Image.create(newImageOptions, 50, 50), TiffImage) as newTiffImage:
newTiffImage.save_argb_32_pixels(image.bounds, pixels)
for frame in newTiffImage.frames:
frameCopy = TiffFrame.copy_frame(frame)
image.add_frame(frameCopy)
image.save()
Source*
Create PNG Images Effortlessly
Creating 16-bit depth PNG images becomes super convenient with Aspose.Imaging for Python via .NET 24.8. Easily prevent exceptions from earlier versions with this feature upgrade and ascertain precise color representation and image quality.
Code Example:
from aspose.imaging import Graphics, Point, Color
from aspose.imaging.brushes import LinearGradientBrush
from aspose.imaging.fileformats.png import PngImage, PngColorType, PngFilterType
from aspose.imaging.imageoptions import PngOptions
outputPath = "output64Bit.png"
createOptions = PngOptions()
createOptions.bit_depth = 16
createOptions.color_type = PngColorType.TRUECOLOR_WITH_ALPHA
createOptions.compression_level = 9
createOptions.filter_type = PngFilterType.SUB
createOptions.progressive = True
with PngImage(createOptions, 100, 100) as pngImage:
graphics = Graphics(pngImage)
gradientBrush = LinearGradientBrush(
Point(0, 0),
Point(pngImage.width, pngImage.height),
Color.blue,
Color.transparent)
graphics.fill_rectangle(gradientBrush, pngImage.bounds)
pngImage.save(outputPath)
Source*
PDF Conversion Accuracy
This Python library release allows accurate PDF conversion by fixing the issues related to incorrect PDF page sizes during image to PDF conversion within your Python image conversion solutions on Windows x64.
Code Example:
from aspose.imaging import Image, LoadOptions
from aspose.imaging.imageoptions import PdfOptions
from aspose.imaging.fileformats.pdf import PdfDocumentInfo
inputFile = "AV Seite 2.jpeg"
outputFile = "AV Seite 2.jpeg.pdf"
with Image.load(inputFile, LoadOptions()) as image:
with PdfOptions() as exportOptions:
exportOptions.pdf_document_info = PdfDocumentInfo()
image.save(outputFile, exportOptions)
Source*
Trusted EPS Conversion
Add EPS conversion modules to your image processing applications with this enhancement and convert EPS files to other image formats.
Code Example:
from aspose.imaging import Image
input = "input.eps"
with Image.load(input) as image:
image.save(input + ".svg")
Source*
You can view the list of all new features, enhancements, and bug fixes introduced in this release by visiting Aspose.Imaging for Python via .NET 24.8 Release Notes.