Image created from HTML was broken on Linux box while working properly in windows system

We are using ASPOSE v22.12.0 and facing issue on Linux which was working fine on windows.

I have attached program.cs in zip which we used to generate base 64 of image. If we used windows platform then correct image is getting generate and base 64 is attached in WindowsSign.txt but if we run same code on Linux system then broken image get generated. Base 64 for same is attached in LinuxSign.txt.

OS for Linux: Ubuntu v 20.04.5 LTS(Focal Fossa)

Program.zip (181.6 KB)

@jsign

We are checking it and will get back to you shortly.

@jsign

We have checked the code snippet shared by you and noticed that you are converting HTML to an Image and then further processing obtained image bytes with Aspose.Imaging. Can you please try to save the image obtained by Aspose.HTML to some physical path and share the output with us? The problem may be on the side of Aspose.Imaging.

Hi,

We tried to remove Aspose.Image part and tried to generate Image from HTML on linux and resulted image is same as broken.

20220112.zip (74.8 KB)

Above zip contains below files,
Program.txt: Code we used to generate Image
Image_base64.txt : Base 64 of generated image
HTML_Image_Linux…png: Generated image

Same issue already created here in Aspose.Imaging and they closed as they feel issue at Aspose.HTML,

@jsign

An investigation ticket as HTMLNET-4202 has been logged in our issue tracking system to further analyze this case. We will look into its details and keep you posted with the status of its correction. Please be patient and spare us some time.

We are sorry for the inconvenience.

Hi Asad,

One of our release is waiting for update of this issue. Can we have some timeline on when can we fix this issue? It will help us to do planning at our side.

Thank you!

@jsign

In 1st Quarter, we plan to improve the quality of rendering for UNIX systems in a variety of ways. We plan to improve the rendering quality of text, pictures and graphical primitives. These fixes will most likely fix all rendering issues in your document. At the end of Q2, we plan to finish testing a new rendering system for UNIX systems that will remove the dependency on GDI+. This will slightly change the rendering result, but will improve the quality of the rendering even more.

Hi @asad.ali,

Just checking are you still on track with HTMLNET-4202? Have you define release date for this ticket?

Also please confirm same issue will work with .Net 6.0 on Linux box.

@jsign

We have been working over the logged ticket however, a release date has not been defined yet. Nevertheless, we will update you as soon as we make some progress and have some promising ETA to share.

We will investigate the ticket from this perspective as well and let you know once we have some updates to share. Please spare us some time.

@jsign

We have fixed the rendering problems and checked the rendering to image with the library version 23.5 on Windows and Ubuntu platforms. When using the same folder with fonts, the result was identical. The slight difference in rendering is due to the use of different versions of GDI+. This difference in pixels leads to a different result when converting to base64. For more information about changing the font selection folder, see the documentation Font Folder - How to Install using C#
Ubuntu 20.04.4 LTS, Dotnet SDK version 6.0.408

files.7z (172.2 KB)

The issues you have found earlier (filed as HTMLNET-4202) have been fixed in this update. This message was posted using Bugs notification tool by avpavlysh