Critical Aspose.psd java bugs for effects and text layers

Hi support, We are trying out Aspose.PAD for java SDK, but we getting a a lot of issues for Layer effects and text layers.

System: Mac Ventura
SDK: Java SDK version 23.4

First, this is the code we use for all the issues, this is place in a button event:

PsdLoadOptions loadOption = new PsdLoadOptions();
loadOption.setAllowWarpRepaint(true);
loadOption.setLoadEffectsResource(true);
loadOption.setUseDiskForLoadEffectsResource(true);

    PsdImage image = (PsdImage)com.aspose.psd.Image.load("test.psd", loadOption);
    
    var pngOptions = new PngOptions();
    image.save("test.png", pngOptions);

Issue 1(Critical): Loading some PSD file with Outglow effect file will failed with Exception:
Image loading failed. —> class com.aspose.psd.coreexceptions.imageformats.PsdImageException: Color section in the resource must contain 3 color components for RGB or 4 color components for CMYK

this is a sample file: Bug1.psd - Google Drive

Issue 2: PSD file has Layer out glow effect with purple color, but light yellow is rendered by SDK.
See Bug 2 in this sample PSD file: Bugs.psd - Google Drive
Expect result: Expected Result.png - Google Drive
Actual result: Actual Result.png - Google Drive

Issue 3, 4 and 5(Critical): Text are all over the place after SDK rendering. I have box setup in sample PSD to test if the Text in render at the right position, but None of text rendering in stay in the box.
Issue 3 use custom font that installed in the system.
Issue 4 use System font “Arial”
Issue 4 use “Adobe font”.
None of them rendered in right place.

And with Issue 4, font style is not rendered at all, it’s replaced by a default font. How can we render Adobe font?

Sample file: Bugs.psd - Google Drive
Expect result: Expected Result.png - Google Drive
Actual result: Actual Result.png - Google Drive

Issue 6(Critical): Seems like there is a cache function in the SDK. When I run the above code, then go back to photoshop, edit the PSD file, then without exit the hosting app(Above code is place in a button event), run the above code again, the changes I made are not going to the output image, output still the same. How can I force it to reload PSD everytime, so it can take in all the new changes?

Thanks you

Issue 7: Drop shadow effect is not showing correctly, using the same code from above, We are only doing load the PSD and save it to png to test. There are two layers, one layer clip to second layer, layer below has drop shadow.

Sample PSD: DropShadowIssue.psd - Google Drive
Expected Result: ExpectDropShadow.png - Google Drive
Actual Result: DropShadowIssue.png - Google Drive

@Coolnology
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PSDJAVA-465,PSDJAVA-466,PSDJAVA-467,PSDJAVA-468

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

The some of them will be fixed in the nearest version.

Thanks @Dmitriy.Sorokin, There are 7 issues I raised, and you created 4 internal issues. Could you indicated which your internal issue related to which issues I raised? Also which will be fixed in the nearest version? and what’s the estimated release date for it? Thank you.

@Coolnology I combined several tasks into one.

PSDJAVA-465: Loading some PSD file with Outglow effect file fails with exception: Color section must contain 3 color components for RGB or 4 color components for CMYK
PSDJAVA-466: PSD file has Layer out glow effect with purple color, but light yellow is rendered
PSDJAVA-467: Incorrect Text Layer Placement After rendering (Here issues 3, 4, 5)
PSDJAVA-468: Drop shadow effect is not showing correctly

About issue 6, I’m not sure, we need additional investigation. It looks like you described the common Photoshop behavior, at glance, we consider this can not be changed. And to make Photoshop reload file, you need to use some external utility that watches the file change and closes Photoshop and opens it again.

Thanks @Dmitriy.Sorokin, for issue 6, what I try to do is have a simple application has one button doing the load and save function, and what I am going to do is press the button twice, but between the presses, I am going to modify the psd file in a image editor(doesn’t matter it’s photoshop or gimp, just do a slightly change). The final image generated for two presses should be different. But I am getting the same result. That’s why I don’t get it, the source PSD has been changed, why still the same?

@Coolnology could you please provide the code snippet to reproduce this. Aspose.PSD doesn’t make any caching, but there are some layers that should be updated by special commands, like “Update”.

Thanks @Dmitriy.Sorokin, For issue 6, I think I have the fix/workaround for the issue now, I just need to call psdImage.dispose(); after the save. But this is still a problem with the SDK because it should init different instance of PSD image that every time that I called load().

May be you will need to fix it.
there is test project: TestApp.zip - Google Drive
There is the sample file: 1.psd - Google Drive

Step to reproduce:

  1. Go into the code, change “Path to 1.psd” and “Path to test.png” to what whatever your 1.psd are and where you want to output the result.
  2. Build and run the App.
  3. Press the button, it will now output “Test.png” with green colour circle.
  4. Do not exit the Test App. Open “1.psd” in photoshop, change the circle colour to red and save the file.
  5. Go back to Test app, press the button again.
  6. Check “Test.png”, the color still green.

Expected result: I should get a new instance of PSDimage object when I click that button and called load
Actual result: Seems like I am getting the same instance. so it never reload .psd file from the disk.
Workaround: call psdimage.dispose() after save will fix it.

@Dmitriy.Sorokin, any time frame for all these issues to be fixed? I think all of them are very fundamental but critical functions, should be fixed ASAP, otherwise it’s limiting the basic use of the SDK.

@Coolnology I created investigation task for this case. PSDJAVA-469. It’s also was atached to this topic.

@Coolnology we are currently working on some of these bugs. This week we will release Aspose.PSD for Java 23.6. It’s possible that some of the issues will be fixed in 23.8. We plan to make it in 1-2 months.

@Dmitriy.Sorokin , Thanks, hope you can fix them ASAP, we need them urgently.

1 Like

Hi @Dmitriy.Sorokin, Any update on this one?

@Coolnology we are publishing release 23.6, Described tasks are planned for 23.8

Thanks @Dmitriy.Sorokin, I have checked 23.6, none of them got fixed. These basic functionality bugs should have much higher priority. We really need a fix or at least a workaround very soon.

@Dmitriy.Sorokin, Also, 23.6 introduces a new exception when saving a psd image: ex = (com.aspose.psd.coreexceptions.ImageSaveException) class com.aspose.psd.coreexceptions.ImageSaveException: Image export failed. —> java.lang.NullPointerException: Cannot invoke “com.aspose.psd.Point.setX(int)” because “[][0]” is null

@Coolnology could you please provide input file and code snippet to reproduce it. I’ll make new issue on the tracker. At this moment Aspose.PSD Java Team works on the bug with effects.

Here is the project file to reproduce the new bug. TestApp 3.zip - Google Drive
PSD file in the resource folder.

@Dmitriy.Sorokin for the above project. Same code works in 23.4.

@Dmitriy.Sorokin To be honest, I love your product, but you really need to be more serious on quality control and be more productive in bug handling. Otherwise people just can’t use it in the more serious projects.