Affichage des résultats 1 à 6 sur 6
Discussion: Filigrane incrementale
Vue hybride
-
12/10/2014, 18h29 #1Membre
- Inscription
- août 2006
- Localisation
- FRANCE
- Âge
- 52
- Messages
- 428
- Boîtier
- 7D + Grip
- Objectif(s)
- 15-85 IS USM + 70-200 F4 L IS+ 50 f1.4
Bonjour Antec
Oui c'est ceci mais je veux rester sur un script ( gratuit )
je voulais éviter de passé par une appli supplementaire.
Bonjour YVnod77
j'avais compris que la valeur thenumber contrôlais le numero mais je ne veux pas a avoir a modifier le code pour chaque utilisation.
Je pensais qu'il était possible d'avoir une boite de dialogue qui demande le numero de depart.
J'ai fais des essais mais le contenu de ma boite de dialogue est considéré comme du texte
exemple si je rentre 100
l’incrémentation se fait 100 1 - 100 2 - 100 3 - 100 4
voici mon essai :
Merci pour votre aideCode:// vous utilisez ce script à vos propres risques ! #target photoshop // folder selection; var theFolder = Folder.selectDialog ("select folder"); if (theFolder) { var theFolderFiles = retrieveTIFandPSDandJPG (theFolder, []); var originalRulerUnits = preferences.rulerUnits; preferences.rulerUnits = Units.PERCENT; var reponse = prompt("Numero de la première photo ?", "<Entrez ici votre numero>"); if( reponse == null ){ alert("Vous avez cliqué sur Annuler"); } else var r = reponse; } // work through the files; for (var m = 0; m < theFolderFiles.length; m++) { var theNumber = bufferNumberWithZeros(r+ m, 3); var myDocument = app.open(File(theFolderFiles[m])); // getting the name and location; var docName = myDocument.name; var basename = docName.match(/(.*)\.[^\.]+$/)[1]; //getting the location; var docPath = myDocument.path; // create a text layer; var textLayer = myDocument.artLayers.add(); textLayer.kind = LayerKind.TEXT; textLayer.name = "text"; textLayer.blendMode = BlendMode.NORMAL; textLayer.opacity = 100; var myTextRef = textLayer.textItem; myTextRef.size = 150; myTextRef.font = "Arial"; var newColor = new SolidColor(); newColor.rgb.red = 255; newColor.rgb.green = 255; newColor.rgb.blue = 255; myTextRef.color = newColor; myTextRef.position = new Array( 1, 99); myTextRef.contents = theNumber; // jpg options; var jpegOptions = new JPEGSaveOptions(); jpegOptions.quality = 12; jpegOptions.embedColorProfile = true; //save jpg; myDocument.saveAs((new File(docPath+"/"+theNumber+"_"+basename+".jpg")),jpegOptions,true); myDocument.close(SaveOptions.DONOTSAVECHANGES) }; preferences.rulerUnits = originalRulerUnits; ; ////// get tif-, psd-, jpg-files from folder and subfolders ////// function retrieveTIFandPSDandJPG (theFolder, theFiles) { if (!theFiles) {var theFiles = []}; var theContent = theFolder.getFiles(); for (var n = 0; n < theContent.length; n++) { var theObject = theContent[n]; if (theObject.constructor.name == "Folder") { theFiles = retrieveTIFandPSDandJPG(theObject, theFiles) }; if (theObject.name.slice(-4) == ".tif" || theObject.name.slice(-4) == ".psd" || theObject.name.slice(-4) == ".jpg") { theFiles = theFiles.concat(theObject) } }; return theFiles }; ////// buffer number with zeros ////// function bufferNumberWithZeros (number, places) { var theNumberString = String(number); for (var o = 0; o < (places - String(number).length); o++) { theNumberString = String("0" + theNumberString) }; return theNumberString };
Informations de la discussion
Utilisateur(s) sur cette discussion
Il y a actuellement 1 utilisateur(s) naviguant sur cette discussion. (0 utilisateur(s) et 1 invité(s))
Discussions similaires
-
Filigrane sous LR 3.6
Par Golgoth XII° dans le forum LightroomRéponses: 15Dernier message: 17/08/2014, 22h33 -
filigrane de ronce
Par dkeith dans le forum [Noir & Blanc]Réponses: 3Dernier message: 20/10/2011, 14h58 -
Filigrane or not ...
Par Michel_R dans le forum Discussions généralesRéponses: 6Dernier message: 04/06/2010, 23h54 -
filigrane et Lightroom
Par chacha95 dans le forum LightroomRéponses: 2Dernier message: 26/01/2009, 02h28 -
Filigrane
Par gribou dans le forum Les Logiciels photoRéponses: 1Dernier message: 03/05/2007, 17h21





