Kernel Filter Support
With Aspose.Imaging for Python via .NET 24.4, we have added support for applying kernel filters in images for tasks like blurring, sharpening, edge detection, and more within your Python code on 32-bit Windows machines.
Enhanced User Experience
Python developers can now use improved descriptions for base classes which makes it easier to understand and utilize the library’s functionalities.
Seamlessly manipulate DICOM tags within your imaging apps as we have introduced the ability to modify DICOM tags embedded within medical images in the Python API. This feature allows you to expand the reach of imaging solutions developed with this library to the healthcare sector. The following example highlights how to edit DICOM tags using the Python API:
from aspose.pycore import as_of
from aspose.imaging import Image
from aspose.imaging.fileformats.dicom import DicomImage
with as_of(Image.load("ttfm.dcm"), DicomImage) as image:
image.file_info.update_tag_at(33, "Test Patient") # "Patient's Name"
image.file_info.add_tag("Angular View Vector", 234)
image.file_info.remove_tag_at(29) # "Station Name"
image.save("output.dcm")
Source*
Incorrect PDF Conversion
PDF conversion capabilities of our imaging API have been enhanced in the latest update by fixing the problems with converting a TIFF image with varying resolutions to PDF. This sample code shows how to convert a TIFF file containing different horizontal and vertical resolutions to PDF format.
from aspose.imaging import Image, RasterImage, SizeF, ResolutionSetting
from aspose.imaging.imageoptions import PdfOptions
from aspose.pycore import as_of
inputPath = "L232_20230920113909_033414.tif"
outputPath = inputPath + ".pdf"
with as_of(Image.load(inputPath), RasterImage) as image:
pdf_options = PdfOptions()
pdf_options.page_size = SizeF(image.width, image.height)
pdf_options.resolution_settings = ResolutionSetting(image.horizontal_resolution, image.vertical_resolution)
image.save(outputPath, pdf_options)
Source*
PS/EPS Export
This release also brings enhanced PS (EPS) file export functionality, ensuring accurate conversion results on Windows 32-bit systems. Please check out the following code example to learn how to convert PS files to PNG images:
from aspose.imaging import Image
with Image.load("input.ps") as image:
image.save("output.png")
Source*
EPS to SVG Conversion
The EPS to SVG conversion feature has been improved in this update to the API. This ensures text inclusion and improved performance for large SVG exports on Windows x32 machines.
Various improvements have been added in this version to fix the issues related to the inability to convert CDR images to DXF format. The following code snippet illustrates CDR to DXF conversion in Python:
from aspose.imaging import Image
from aspose.imaging.imageoptions import DxfOptions, VectorRasterizationOptions, PositioningTypes
with Image.load("Laser Cut Christmas Gift New Year Night Lamp CDR File.cdr") as image:
dicom_options = DxfOptions()
vector_options = VectorRasterizationOptions()
vector_options.positioning = PositioningTypes.RELATIVE
dicom_options.vector_rasterization_options = vector_options
image.save("result.dxf", dicom_options)
Source*
EMF to PDF Text Wrapping
Add the ability to export EMF files as PDF documents with improved text wrapping in your image conversion apps. This sample code showcases EMF to PDF conversion:
from aspose.pycore import as_of
from aspose.imaging import Image, Rectangle
from aspose.imaging.fileformats.emf import EmfImage
with as_of(Image.load("50123_pg1.emf"), EmfImage) as emfImage:
# The original canvas is too large, resize to A4, 72 DPI
emfImage.resize_canvas(Rectangle(0, 0, 595, 842))
emfImage.save("50123_pg1.pdf")
Source*
DJVU to PDF First Page Issue
Experience enhanced DJVU to PDF conversion as we have fixed the issues causing a blank first page during this conversion. You can learn to convert DJVU files to PDF in Python with the help of the following example:
from aspose.imaging import Image
from aspose.imaging.imageoptions import PdfOptions
with Image.load("Sample1.djvu") as image:
image.save("Sample1.pdf", PdfOptions())
Source*
Updated Public API
We have updated the Aspose.Imaging for Python via .NET API by adding and removing several classes, methods, enums, and properties to facilitate Python developers with a stable library and a great user experience on Windows 32-bit machines.
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.4 Release Notes.