Script copy paste layer color profile mismatch
Wondering if there is a better way to handle color profile mismatch when copying and pasting layers from two separate documents using a script?
For instance source file jpg sRBGB and destination file psd Adobe RGB 1998.
Does the following sequence make sense to avoid a color profile mismatch and the Photoshop color mismatch alert dialog?
Open source doc
Define variable source doc color profile
Get source doc color profile
Write source doc color profile to external txt data file
Copy source doc layer
Close source doc without saving
Open destination doc
Define variable destination doc color profile
Get destination doc color profile
Read the external txt data file
Check color profile variables
If color profile mismatch
Convert destination doc color profile to source doc color profile. // avoids alert dialog
Copy source doc layer
Restore destination doc color profile
Else
Copy source doc layer
Save destination doc
Close destination doc
