Hebrew text watermark behaves differently on Windows and Linux

Hey,

I am writing to you because I ran into the following problem: I would like to add a Hebrew watermark text on an image. On Windows it is working fine, but on Linux (which runs the same code), the Hebrew text’s characters are watermarked in reverse order on the image.

Hebrew text: “עִבְרִית” (it means “Hebrew”)

Result watermark text:

  • Windows: “עִבְרִית”
  • Linux: “תירִבְעִ”

DLL version: 20.8.0

OS details:

  • Windows Server 2019 Standard
  • Linux Ubuntu 18.04.5 LTS

I attached a simple project as well that can be run on both platforms and produces the above mentioned results (you can check the outputs in the test_files folder). If you build and run the project, you can also see on the console that before adding the watermark to the image the unicode byte order is the same on both platforms (“5E2 5B4 5D1 5B0 5E8 5B4 5D9 5EA”). Parsing this unicode codes to Hebrew characters, you can realize that this sequence represents the reversed order which is put on the image on Linux. I find it interesting that both platforms reverse the byte order and it is even more interesting that Windows reverses it again to the right order before watermarking.

I would be interested if you know about such an issue and would be grateful if you could provide some feedback or solution for that.

Thank you,
Tamas Boldizsar

aspose-imaging.zip (779.5 KB)

@tamas.boldizsar

I have added the issue with ID IMAGINGNET-4151 in our issue tracking system to further investigate the issue on our end. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

@mudassir.fayyaz

Thank you very much for further investigating the issue!

@tamas.boldizsar

You are welcome. We will apprise you as soon as the issue will be addressed.

@tamas.boldizsar

We have investigated this on our end and have found this bug is related to the used .NET in the Linux library Libgdiplus. For more details, please visit this weblink for your convenience.

@mudassir.fayyaz

Undestood. Thank you very much for you effort!

@tamas.boldizsar

Thank you for your understanding.