File cannot be opened when certain Asian characters are added to text layers


#1

Hi,
if you update text layer with certain Asian characters and save the file, result cannot be opened in PhotoShop.
Attached you can find source file and resulting files with specific problematic characters:
I could identify the following characters forcing Photoshop to crash:
Chinese, simplified: 展 就

Korean: 로 한
Japanese: 岩
Chinese Traditional: 就 利

Please note, this list is not complete.
test.zip (94.7 KB)


#2

@rlaskowski.sdl,

I have observed the issue shared by you and suggest you to please first try using Aspose.Imaging 18.6 on your end. If there is still an issue then please share the working sample code along with snapshot of issue incurring on your end.


#3

Hi,
yes, it’s still happening with 18.6 - and to repro, simply update any text layer with character mentioned above.


#4

@rlaskowski.sdl,

I request you to please share the sample application along with generated output with us. We will be able to investigate the issue further on our end on provision of requested information.


#5

Sample you can find in How to write \ character to PSD file - generated outputs were attached in original report


#6

@rlaskowski.sdl,

I have worked with shared sample code and following sample file.

I have generated the attached PSD file after update text on my end. Can you please try opening the same on your end. If you observe issue then as requested earlier, please share the snapshot of error occurring on your end.

target_test.zip (17.7 KB)


#7

Hi,
yes, the file you generated throws error when opening in Photoshop - does it work for you?
In Photoshop I get this error:
Could not complete your request because of a program error.


#8

@rlaskowski.sdl,

As requested earlier, can you please share the snapshot of error when opened in Photoshop.

An issue with ID IMAGINGNET-3052 has been created in our issue tracking system to investigate and resolve the issue.


#9

here you go
upload_thumb.png (12.5 KB)


How to write \ character to PSD file
#10

@rlaskowski.sdl,

Thank you for sharing the information with us.


#11

The issues you have found earlier (filed as IMAGINGNET-3052) have been fixed in this update.


#12

Hi,
it seems that the issue is still repro, but issue " How to write \ character to PSD file" is fixed - can you please recheck it?


#13

Hi rlaskowski.sdl,

I suggest you to please try using following sample code on your end to verify the issue using latest Aspose.Imaging for .NET 18.8.

string filePath = @"test.psd";            
            string outputFilePath = "result.psd";

        using (Image image = Image.Load(filePath))
        {
            if (!(image is PsdImage))
            {
                return;
            }

            PsdImage psdImage = (PsdImage)image;
            Layer[] layers = psdImage.Layers;

            for (int index = layers.Length - 1; index >= 0; index--)
            {
                Layer layer = layers[index];

                if (!(layer is TextLayer))
                {
                    continue;
                }

                TextLayer textLayer = (TextLayer)layer;
                textLayer.UpdateText(@"\\()");
            }

            PsdOptions imageOptions = new PsdOptions(psdImage);


            psdImage.Save(outputFilePath, imageOptions);
      }

#14

HI,
but this particular issue is talking about specific Asian characters, not \ - so what is fixed in 18.8?
Based on our testing \ issue is fixed, but Asian characters are still causing issues.


#15

@rlaskowski.sdl,

Can you please provide the generated output using above code and sample and Aspose.Imaging 18.8 so that we may investigate the issue further on our end.


#16

HI,
using following code:
using (var image = Image.Load(filePath))
{
if (!(image is PsdImage)) return;

            var psdImage = (PsdImage)image;
            var layers = psdImage.Layers;

            for (var index = layers.Length - 1; index >= 0; index--)
            {
                var layer = layers[index];

                if (!(layer is TextLayer)) continue;

                var textLayer = (TextLayer)layer;
                textLayer.UpdateText("展 就");
            }

            var imageOptions = new PsdOptions(psdImage);

            var fileName = Path.GetFileName(filePath);
            var outputFilePath = Path.GetDirectoryName(filePath) + "\\target_" + fileName;
            psdImage.Save(outputFilePath, imageOptions);
        }

You will get attached file which fails to open in Photoshop
target_SimpleText.zip (13.8 KB)


#17

@rlaskowski.sdl,

I have observed PSD shared and there is a blank PSD when I open it in PSD Viewer. Can you please provide Photoshop version and snapshot of errr so that I may update ticket accordingly.


#18

error.png (2.3 KB)
Error, attached.
The Photoshop version is CC 2018 (19.1.3 Release).
Characters you should see are 展 就


#19

@rlaskowski.sdl,

I have observed issue shared by you. An issue with ID IMAGINGNET-3023 has been created in our issue tracking system to investigate and resolve the issue.


#20

Hi,
do you have any estimate when this issue will be solved? I will be fine to test any pre-release version.
Regards