Can someone solve or give me a solution for this problem...?

Hello world!

Can someone solve or give me a solution for this problem...?

We used two folders Source & Finalwork. We get image Source folder and path of silo put & moved to Finalwork folder.

Is it possible to check if the two colors of Embedded images folder profile identical or not.

-yajiv

Could you elaborate what you mean by that

We get image Source folder and path of silo put & moved to Finalwork folder.

Perhaps with a screenshot to illustrate the task?

// 2012, use it at your own risk;
#target photoshop
var theFolder = Folder.selectDialog ("select source folder");
if (theFolder) {
var theFiles = theFolder.getFiles(/\.(jpg|tif|eps|psd)$/i)
};
var theOtherFolder = Folder.selectDialog ("select target folder");
if (theOtherFolder) {
var theOtherFiles = theOtherFolder.getFiles(/\.(jpg|tif|eps|psd)$/i)
};
var missingFiles = new Array;
var unmatchedProfiles = new Array;
// work through files;
for (var m = 0; m < theFiles.length; m++) {
          var check = false;
          var theFile = theFiles[m];
// find name of the same name;
          for (var n = 0; n < theOtherFiles.length; n++) {
                    var theOtherFile = theOtherFiles[n];
// if one is found;
                    if (theFile.name == theOtherFile.name) {
                              check = true;
                              var oneFile = app.open(File(theFile));
                              var otherFile = app.open(File(theOtherFile));
// check profiles;
                              if (oneFile.colorProfileName == otherFile.colorProfileName) {
                                        }
// collect umages with unmatched profiles;
                              else {unmatchedProfiles.push(theFile)};
                              };
                    };
// collect missing files;
          if (check == false) {alert ("hahaha");missingFiles.push(theFile)}
          };
// alert of problems;
if (unmatchedProfiles.length > 0) {
alert ("the corresponding files for these do have a different color space:\n"+unmatchedProfiles.join("\n\n"));
};
if (missingFiles.length > 0) {
alert ("these files miss corresponding ones:\n"+missingFiles.join("\n\n"));
};
//////
////// get psds, tifs and jpgs from files //////
function getFiles (theFile) {
    if (theFile.name.match(/\.(jpg|tif|psd|pdf|)$/i)) {
        return true
        };
          };

Tags: Photoshop

Similar Questions

Maybe you are looking for