The rendering result does not match the actual result

image.jpg (148.4 KB)

version: 23.9

@Crane Could you please provide input file and the code snippet to reproduce issue. Unfortunately code is partially missed on screenshot.

package org.example;

import com.aspose.psd.FontSettings;
import com.aspose.psd.Image;
import com.aspose.psd.fileformats.psd.PsdImage;
import com.aspose.psd.fileformats.psd.layers.Layer;
import com.aspose.psd.fileformats.psd.layers.TextLayer;
import com.aspose.psd.imageoptions.PngOptions;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {
        Image load = Image.load("src/main/resources/psd/modify.psd");
       // FontSettings.setFontsFolders();
        if(load instanceof PsdImage psdImage){
            for (Layer layer : psdImage.getLayers()) {
                System.out.println(layer.getName());
              if ("company-name".equals(layer.getName())
                    && layer instanceof TextLayer textLayer) {
                    textLayer.updateText("Crane very good!");
              }
            }
            PngOptions options = new PngOptions();
            psdImage.save("modify-txt.png",options);
            System.out.println(psdImage);
        }
    }
}

The PSD is too large to send, can I use Google Mail?

@Crane if it possible please compress file and add it to any temporary file storage and then share the url. Please note, if you don’t want somebody not from Aspose to download your file, it’s better to send the url to me in the DM message. Unlike uploading the file directly, urls can be accessed by anyone.

Let’s temporarily use GitHub.

@Crane I’ve downloaded input. I’ll text you back after the investigation.

1 Like

The principle of Aspose.psd is to parse the psd file structure and implement a set of rendering engine by yourself? I see that many frameworks only support parsing, and do not support modifying the image immediately.

@Crane yes, Aspose.PSD parsed PSD file and then can render the most popular features immediately. But there are some limitations. Text rendering, Effects and Warp rendering slightly differs. Not all Layer Effects are supported, but it’s possible to add your own implementation. It’s better to check if the Aspose.PSD is suitable for your cases or not. In short, when editing, many things may be slightly different, but all supported features were made qualitatively. Pixel-perfect rendering in Readonly mode is also possible Aspose.PSD is the most completed PSD Rendering Solution. Please check our temporary licenses for the investigation Temporary License - Purchase - aspose.com

@Crane could you please try to reproduce your task with latest Aspose.PSD for Java 24.4 - 24.5 Aspose.PSD