Affichage des résultats 1 à 45 sur 130
Discussion: Script Photoshop et les infos EXIF
Mode arborescent
-
07/07/2008, 18h51 #15
- Inscription
- mai 2008
- Localisation
- 72
- Âge
- 63
- Messages
- 632
- Boîtier
- aucun
- Objectif(s)
- jocker
Bonsoir,
J'ai téléchargé celui-ci:
var DocActif = activeDocument; // Document actif (image ouverte au premier plan)
var exifData = DocActif.info.exif.toString()
var exifArray = explodeArray(exifData,",")
///////////////////////////////////////////////////////////////////////////////
// Function: explodeArray (credit: Joe Colson)
// Usage: creates array of strings from argument item using delimiter as index
// Input: string item, delimiter
// Return: tempArray, an array of strings from string argument item
///////////////////////////////////////////////////////////////////////////////
function explodeArray(item, delimiter) {
tempArray = new Array()
var Count = 0
var tempString = new String(item)
while (tempString.indexOf(delimiter) > -1) {
tempArray[Count] = tempString.substr(0,tempString.indexOf(delimiter))
tempString = tempString.substr(tempString.indexOf(delimiter) + 1,
tempString.length - tempString.indexOf(delimiter) + 1)
Count = Count + 1
}
return tempArray
} // End explodeArray
///////////////////////////////////////////////////////////////////////////////
// Function: getArrayString (credit: Joe Colson)
// Usage: searches for string searchString
// Input: inputArray, searchString
// Return: string following "searchString" in array inputArray
///////////////////////////////////////////////////////////////////////////////
function getArrayString(inputArray,searchString) {
for(n = 0; n < inputArray.length; n = n + 1 ) {
if(inputArray[n] == searchString) {
return inputArray[n + 1]
}
}
} // End getArrayString
try
{
// Définition d'une variable définissant une couleur blanche, que nous utiliseront plus loin
var colorBlanc = new SolidColor();
colorBlanc.rgb.red = 255;
colorBlanc.rgb.blue = 255;
colorBlanc.rgb.green = 255;
// On crée un nouveau calque texte
var oLayer = DocActif.artLayers.add();
oLayer.kind = LayerKind.TEXT; // Type de calque = calque de texte
oLayer.name = "Nom du calque"; // Nom du calque
var oTextItem = oLayer.textItem; // On définit une variable qui permettra de simplifier les accès au calque de texte créé
oTextItem.font = "Arial"; // Définition de la police
oTextItem.size = 16; // Définition de la taille de police
oTextItem.color = colorBlanc; // Définition de la couleur du texte
////////////////////////////////////////////////////////////////////////////
////////// ZONE MODIFIABLE (insertion de votre texte)
////////////////////////////////////////////////////////////////////////////
//////////
// Lecture des informations EXIF contenues dans l'image
var exitTempsExpo = getArrayString(exifArray, "Exposure Time");
var exifAPN = getArrayString(exifArray, "Model");
var exifOuverture = getArrayString(exifArray, "F-Stop");
var exifISO = getArrayString(exifArray, "ISO Speed Ratings");
var exifFocale = getArrayString(exifArray, "Focal Length");
var exifCorrection = getArrayString(exifArray, "Exposure Bias Value");
if(exifCorrection!="0.0")
{ exifCorrection=", " + exifCorrection + " EV"; }
else
{ exifCorrection=""; }
// Pour créer un retour à la ligne (parfois utile) insérer "\u000D"
// Insertion du modèle d'appareil, d'un saut de ligne suivi des EXIFs
oTextItem.contents = exifAPN + "\u000D" + exifFocale.replace(".0 ","") + ", " + exifOuverture + ", " + exitTempsExpo.replace(" sec", "") + "ème, " + exifISO + " ISO" + exifCorrection; // Contenu du texte
}
} // End getArrayString
//////////
//////////
////////////////////////////////////////////////////////////////////////////
Mais il ne fonctionne pas.
Y a t'il quelqu'un qui pourrait le vérifier, et le corriger?
Merci de vôtre aide.
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
-
Voir les infos exif sans ouvrir l'image
Par titerm dans le forum Autres logicielsRéponses: 33Dernier message: 06/11/2009, 09h41 -
[AIDE] infos iptc et exif
Par olivebrazil dans le forum Discussions généralesRéponses: 4Dernier message: 02/12/2007, 20h04 -
Renommer vos images par lot avec les infos EXIF
Par LeCelte dans le forum Les Logiciels photoRéponses: 9Dernier message: 22/11/2006, 18h13 -
Identification d'un objectif dans les infos Exif ?
Par Scoubi1er dans le forum DXORéponses: 9Dernier message: 23/12/2005, 12h59