• Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
    Dedicated community for Japanese speakers
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
    Dedicated community for Korean speakers
Exit
0

javascript export png with embedded color profile

Community Beginner ,
Mar 28, 2023 Mar 28, 2023

Copy link to clipboard

Copied

Dear all,

i have my .jsx script that works good until the 23.5.5 version of Photoshop.

I work on a mac mini with osx 12.6.3.

I've downloaded the last version on Photoshop (24.3.0),but with this version the script works but didn't include the color profile,only the color work space.

Did any one get the same issue?

 

thank you so much

Sergio

 

Here the piece code:

function exportToPngLow(docRef){
     
    var pngOpts = new PNGSaveOptions;
    pngOpts.compression = 4;
    pngOpts.interlaced = false;
    pngOpts.PNG8 = false
    pngOpts.transparency = true
    pngOpts.includeProfile = true
   
    var findInNameFront = "front";
    var isDetailFront = (docRef.name.toLowerCase().indexOf(findInNameFront.toLowerCase()) > -1);
    var findInNameSide = "side";
    var isDetailSide = (docRef.name.toLowerCase().indexOf(findInNameSide.toLowerCase()) > -1)
    var findInNameBack = "Back";
    var isDetailBack = (docRef.name.toLowerCase().indexOf(findInNameBack.toLowerCase()) > -1)

    if (isDetailFront) {
        var fullnewNameFront = docname + '_Front' + '_Web.png'
        docRef.saveAs((new File([target + "/" + docname] + "/" +  fullnewNameFront)), pngOpts, true);
    }
    if (isDetailSide){
        var fullnewNameSide = docname + '_Side' + '_Web.png'
        docRef.saveAs((new File([target + "/" + docname] + "/" +  fullnewNameSide)), pngOpts, true);

    }
    if (isDetailBack){
        var fullnewNameBack = docname + '_Back' + '_Web.png'
        docRef.saveAs((new File([target + "/" + docname] + "/" +  fullnewNameBack)), pngOpts, true);
    }
    else {
}
}

 

TOPICS
macOS

Views

510

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 28, 2023 Mar 28, 2023

Copy link to clipboard

Copied

thanks for the awesome information, I'm also facing the same issue.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 26, 2023 Apr 26, 2023

Copy link to clipboard

Copied

LATEST

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 28, 2023 Mar 28, 2023

Copy link to clipboard

Copied

Is there a profile assigned before you run the script?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 29, 2023 Mar 29, 2023

Copy link to clipboard

Copied

Hi Lumigraphics,

i've double checked the PSD,and yes it is assigned.

I spoke with the live chat of Adobe,they told that this can be an issue and that there is no documentation on Github about the last version of PS.

At the moment i keep 2 different version of PS..

If anyone knows....

Thank you

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 29, 2023 Mar 29, 2023

Copy link to clipboard

Copied

If I recall correctly one needs to save (a copy) as png to be able to embed the ICC Profile, Safe for Web won’t do that (anymore). 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 29, 2023 Mar 29, 2023

Copy link to clipboard

Copied

I was triyng other solution,and i notice that this happen only with the Silicon version and not with the Intel version.

Tomorrow i'll check again.

Sergio

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines