I tried to export image with Grandient Overlay / Outer Glow, but the result were not that I expected.
-
Original PSD
View Adobe® Photoshop® Files | PSD & PSB Viewer App -
Read Only mode exported
7_4 copy_converted_readonly.png (104.5 KB)
- export to PSD
- the outer glow color was changed to green.
View Adobe® Photoshop® Files | PSD & PSB Viewer App
- export to PNG
- gradient overlay effect wasn’t working right.
- Outer Glow was smushed.
7_4 copy_converted2.png (43.8 KB)
Here is my code
var convertedPngFileName = psdFile.getPath().replaceAll(psdFile.getName(), "") + filename + "_converted.png";
try (InputStream psdFileInputStream = new FileInputStream(psdFile)) {
var psdLoadOptions = new PsdLoadOptions();
psdLoadOptions.setLoadEffectsResource(true);
var psdImage = (PsdImage) Image.load(psdFileInputStream, psdLoadOptions);
// update some layer code...
//export
PngOptions option = new PngOptions();
option.setColorType(PngColorType.TruecolorWithAlpha);
psdImage.save(convertedPngFileName, option);
psdImage.save("test.psd");
psdImage.close();
}