Need help to modify my Luminar script to use PNG

Moderator: Kathy_9

Post Reply
JoeB
Posts: 2778
Joined: Fri Mar 28, 2008 10:04 pm
operating_system: Windows 8.1
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: LENOVO 4524PE4 ThinkCentre M91p
processor: 3.10 gigahertz Intel Quad Core i5-2400
ram: 8 GB
Hard_Drive_Capacity: 4.6 TB
Corel programs: PSP 9, X7 to 2019, 32 & 64-bit
Location: Canada

Need help to modify my Luminar script to use PNG

Post by JoeB »

EDIT: Never mind. I figured out how to save the temp file as PNG preserving transparency using the script. I also found out that, while Luminar opens the file it doesn't show the transparency and so when it returns the file to PSP the transparency in the transparent area is lost. Even without using the script if you open a PNG with transparency in Luminar it loses transparency.
------------------------------

Attached is a zip of the JSJ script, modified, that I use to open the 64bit standalone version of Luminar as a plugin in PSP (there is no Windows plugin version at present). The script presently saves its temp copy as either jpg or tiff. The problem is that neither support transparency. Luminar does support exporting in PNG, and its Help file says the advantage of PNG is that it supports embedded transparency (which we all know). However, Luminar's PNG output dialogue doesn't have a transparency option, but it's possible that if it opens a PNG file with embedded transparency it just might export it with that same transparency - I hope. :-) So I want to test it by having it open an image from PSP that has a part of it transparent. And of course Luminar doesn't support .pspimage files so I can't use that.

My problem is that I don't know how to edit the part of the script that presently saves the temp file as .tiff so that it will save that temp file as PNG with transparency. The relevant parts of the script are from Line 71 to Line 89 (i.e., those are the lines that instruct the script how to save the temp file as .tiff). Alternatively the edit could be done to the .jpg save portion of the script (Line 48 to Line 69) because I never use the .jpg option. If someone could provide the proper scripting for saving the temp file as PNG with transparency, it would be greatly appreciated. I can do the minor edit earlier in the script that's needed.

I have recorded both a straight PNG save and a PNG Optimizer save (the latter needed to ensure transparency) but don't know enough to know how to place the information in this script.

Whether or not this will allow me to send an image with transparency to Luminar (or any other third party program) and get the transparency back when the image is returned as a layer to PSP is something I don't have a clue about - but that's the purpose of the experiment I want to try.

Thanks in advance for any help!
Attachments
Luminar 2018.zip
(1.51 KiB) Downloaded 175 times
Regards,

JoeB
Using PSP 2019 64bit
Post Reply