Kernel Filters for Images
Linux developers can enhance their imaging apps with Aspose.Imaging for Python via .NET 24.4. It supports applying kernel filters to images for tasks like blurring, sharpening, edge detection, and more.
Effortlessly manipulate DICOM tags in your Python imaging apps. We have now added the ability to modify DICOM tags embedded inside medical images. This feature allows you to expand the reach of your imaging solutions 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*
Enhanced User Experience
Add easy to understand base class descriptions with this API update and incorporate the library’s image processing capabilities into your customized imaging solutions.
EPS Files to SVG Conversion
Convert EPS files to SVG vectors by including text and experience improved performance for large SVG exports on Linux.
Improved PDF Export
By resolving the issues with converting a TIFF image with varying resolutions to PDF, the latest API release helps you elevate PDF conversion workflows. 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*
Text Wrapping during EMF to PDF Conversion
Update your image conversion applications with the ability to export EMF files to PDF format with improved text wrapping. 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*
Export CDR Files as DXF
You can now export CDR images to DXF format accurately in Python. The following code snippet demonstrates CDR to DXF conversion:
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*
Updates to The Public API
We have updated the public API in Aspose.Imaging for Python via .NET API 24.4 version by including various new classes, methods, enums, and properties. This gives Python developers a stable library and a great user experience on Linux 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.