The latest release of Aspose.Imaging for Python via .NET (v24.8) equips Linux developers with extensive image processing features, such as loading remote images, Python 3.12 support, enhanced PDF conversion, and more.
Add Python 3.12 Features to Your Linux Apps
You can incorporate the advanced features of Python 3.12 into your image manipulation applications on Linux with our Python API and boost their capabilities seamlessly.
Extended Image Loading Features
With the latest release, Python developers can load images from URLs and get rid of the local image file storage. Enjoy convenience and flexibility in loading images from anywhere and supercharge your applications with advanced features.
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*
Efficient TIFF Image Management
Save your multi-frame TIFF images effortlessly in version 24.8 of the Python imaging API without facing the NullReferenceExceptions
from the earlier versions. Manage TIFF images smoothly within your Linux-based applications.
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*
Easily Generate PNG Images on Linux
Aspose.Imaging for Python via .NET now lets you create high-quality 16-bit depth PNG images conveniently and avoids exceptions from the previous library versions.
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*
Convert PDF Documents Accurately
Empower your Python-powered image conversion solutions with an accurate PDF conversion functionality on Linux as we have addressed the problems causing incorrect PDF page sizes while converting images to PDFs.
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*
Our Python image processing library helps you convert EPS images to other formats on Linux efficiently. Upgrade your apps with this feature and start transforming EPS files to different images today.
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.