Versione stampabile della discussione
NikonClub.it Community _ Software _ Informazione Jpeg
Inviato da: debortoli il Dec 11 2005, 11:08 PM
salve
qualcuno saprebbe indicarmi come estrapolare dal file jpeg le informazioni sulle modalità di scatto (esp, diaf, iso eq, flash, data, ...) in modo da visualizzarle a schermo o con un software gia compilato o meglio farmelo in visual basic se mi indicate alcune righe (ho provato a leggere il file in binario ma non riesco a trovare le informazioni e la chiave di codifica).
grazie
Inviato da: robyt il Dec 11 2005, 11:16 PM
Puoi provare Opanda IExif. E' freeware e si può scaricare da http://www.opanda.com/en/iexif/index.html
ciao e benvenuto.
Inviato da: GiorgioBS il Dec 11 2005, 11:27 PM
Questo è uno script che, se usato da Photoshop ad esempio, ti scrive alcuni dati presi dagli exif direttamente nella cornice dello scatto...
studialo un pò e fanne ciò che vuoi...
spero di esserti stato utile....
CODE
//************************************************************************
//
// Caption constants. Change these if you want to.
//
//************************************************************************
// Copyright string
c_CaptionCopyright = "Copyright © Giorgio Baruffi";
c_CaptionFont = "Verdana";
// Caption text
c_CaptionGpsPrefix = "Luogo:"
c_CaptionDateTimeTaken = "Data scatto:"
c_CaptionModel = "Macchina:"
c_CaptionExposureTime = "Tempo:"
c_CaptionAperture = "Apertura:"
c_CaptionFocalLength = "Focale:"
c_CaptionIsoRating = "ISO:"
//************************************************************************
//
// Date and time constants. Change these if you want to.
//
//************************************************************************
c_MonthsArray =
[
"Gen",
"Feb",
"Mar",
"Apr",
"Mag",
"Giu",
"Lug",
"Ago",
"Set",
"Ott",
"Nov",
"Dic"
];
c_AM = "am"
c_PM = "pm"
//************************************************************************
//
// Colors
//
//************************************************************************
function CreateSolidRgbColor(r, g, b)
{
var result = new SolidColor;
result.rgb.red = r;
result.rgb.green = g;
result.rgb.blue = b;
return result;
}
var colorCaptionBackground = CreateSolidRgbColor(255, 255, 255);
var colorFrame = CreateSolidRgbColor(0, 0, 0);
var colorText = CreateSolidRgbColor(0, 0, 0);
//************************************************************************
//
// Include EXIF constants and methods.
//
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// Note the this is not a comment: it includes the contents
// of ExifHelpers.inc in this script!
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//
//************************************************************************
//@include "ExifHelpers.inc"
//************************************************************************
//
// Functions
//
//************************************************************************
//
// Photoshop CS formats the latitude and longitude strings
// oddly:
//
// Example: 47.00 38.00' 33.60"
//
// There is no degrees symbol after the degrees, and
// they leave useless zeroes on the right side of the decimal
// point for both degrees and minutes. This function parses
// the numbers from the latitude and longitude strings, and
// inserts the correct characters where they belong:
//
// Example: 47° 38' 33.6"
//
// It returns an empty string if the string is in an unexpected
// form or doesn't exist.
//
function CorrectlyFormatLatitudeOrLongitude(strLatLong)
{
var strResult = new String("");
// Copy the input string
var strSource = new String(strLatLong);
// Find the first space
nIndex = strSource.indexOf(" ");
if (nIndex >= 0)
{
// Copy up to the first space
strDegrees = strSource.substr(0, nIndex);
// Skip this part, plus the space
strSource = strSource.substr(nIndex + 1);
// Find the tick mark
nIndex = strSource.indexOf("'");
if (nIndex >= 0)
{
// Copy up to the tick mark
strMinutes = strSource.substr(0, nIndex);
// Skip this chunk, plus the tick and space
strSource = strSource.substr(nIndex + 2);
// Find the seconds mark: "
nIndex = strSource.indexOf("\"");
if (nIndex >= 0)
{
// Copy up to the seconds
strSeconds = strSource.substr(0, nIndex);
// Get rid of extraneous trailing zeroes
var nDegrees = parseFloat(strDegrees);
var nMinutes = parseFloat(strMinutes);
var nSeconds = parseFloat(strSeconds);
// Use the correct symbols
strResult = nDegrees.toString() + "° " + nMinutes.toString() + "' " + nSeconds.toString() + "\"";
}
}
}
return strResult;
}
//
// This function gets the GPS location fields and formats them correctly
//
// It returns an empty string if they don't exist
//
function GetFormattedGpsData()
{
var strResult = new String("");
// Get the fields
strLatitude = GetRawExifValueIfPresent(c_ExifGpsLatitude);
strLatitudeRef = GetRawExifValueIfPresent(c_ExifGpsLatitudeRef);
strLongitude = GetRawExifValueIfPresent(c_ExifGpsLongitude);
strLongitudeRef = GetRawExifValueIfPresent(c_ExifGpsLongitudeRef);
// Do all of them exist?
if (strLatitude.length && strLatitudeRef.length && strLongitude.length && strLongitudeRef.length)
{
// Parse and reformat the latitude and longitude
strFinalLatitude = CorrectlyFormatLatitudeOrLongitude(strLatitude);
strFinalLongitude = CorrectlyFormatLatitudeOrLongitude(strLongitude);
// Are they still valid?
if (strFinalLatitude.length && strFinalLongitude.length)
{
// Create the result (with the constant prefix)
strResult = c_CaptionGpsPrefix + " " + strFinalLatitude + " " + strLatitudeRef + ", " + strFinalLongitude + " " + strLongitudeRef;
}
}
return strResult;
}
//
// EXIF dates are formatted kind of funny, with colons
// between the date tokens:
//
// Example: 2005:04:13 16:22:47
//
// This function parses the numbers out of the string
// and formats it like this:
//
// Example: Apr 13, 2005 4:22:47 pm
//
function CorrectlyFormatDateAndTime(strDateAndTime)
{
var strResult = new String("");
// Copy the input string
var strSource = new String(strDateAndTime);
// Find the first colon
nIndex = strSource.indexOf(":");
if (nIndex >= 0)
{
// Copy up to the first space
strYear = strSource.substr(0, nIndex);
// Skip past the colon
strSource = strSource.substr(nIndex + 1);
// Find the next colon
nIndex = strSource.indexOf(":");
if (nIndex >= 0)
{
// Copy up to colon
strMonth = strSource.substr(0, nIndex);
// Skip the colon
strSource = strSource.substr(nIndex + 1);
// Find the next space
nIndex = strSource.indexOf(" ");
if (nIndex >= 0)
{
// Copy up to the space
strDay = strSource.substr(0, nIndex);
// Skip the space
strSource = strSource.substr(nIndex + 1);
// Find the next colon
nIndex = strSource.indexOf(":");
if (nIndex >= 0)
{
// Save the hours
strHours = strSource.substr(0, nIndex);
// Skip the colon
strSource = strSource.substr(nIndex + 1);
// Find the next colon
nIndex = strSource.indexOf(":");
if (nIndex >= 0)
{
// Save the minutes
strMinutes = strSource.substr(0, nIndex);
// Skip the colon
strSource = strSource.substr(nIndex + 1);
// Save the seconds
strSeconds = strSource;
// Assume it is AM
strAmPm = c_AM;
// Is it after noon?
if (strHours >= 12)
{
// Use PM
strAmPm = c_PM;
// If it is after 13:00, subtract 12
if (strHours >= 13)
{
strHours -= 12;
}
}
// If it is 12:xx AM, make it 12:xx instead of 00:xx
else if (strHours == 0)
{
strHours = 12;
}
// Format the string
strResult = parseInt(strDay).toString() + " " + c_MonthsArray[parseInt(strMonth) - 1] + ", " + strYear + " " + parseInt(strHours).toString() + ":" + strMinutes + ":" + strSeconds + " " + strAmPm;
}
}
}
}
}
return strResult;
}
//
// If the value is not an empty string, prepend
// a caption and return the result
//
function GetPrefixedValue(strCaption, strValue)
{
var strResult = new String("");
if (strValue.length)
{
strResult = strCaption + " " + strValue;
}
return strResult;
}
//
// Get a simple EXIF property that doesn't need reformatting
// and prepend its title if the value is present
//
function GetPrefixedSimpleProperty(strCaption, strExifField)
{
return GetPrefixedValue(strCaption, GetRawExifValueIfPresent(strExifField));
}
//
// Format the date and time
//
function GetFormattedDateTimeTaken()
{
return GetPrefixedValue(c_CaptionDateTimeTaken, CorrectlyFormatDateAndTime(GetRawExifValueIfPresent(c_ExifDateTimeOriginal)));
}
//
// Get the model name of the camera.
//
// Unfortunately, there is little consistency for EXIF makes and models.
// For example, the Nikon Coolpix 990 looks like this:
//
// E990
//
// While the D2x looks like this:
//
// NIKON D2X
//
// If your camera has a user-unfriendly name, you might want to modify
// this function to return a user-friendly name.
//
function GetFormattedModel()
{
return GetPrefixedSimpleProperty(c_CaptionModel, c_ExifModel)
}
//
// EXIF exposure time
//
function GetFormattedExposureTime()
{
return GetPrefixedSimpleProperty(c_CaptionExposureTime, c_ExifExposureTime);
}
//
// EXIF f-Stop
//
function GetFormattedAperture()
{
return GetPrefixedSimpleProperty(c_CaptionAperture, c_ExifAperture);
}
//
// EXIF focal length
//
function GetFormattedFocalLength()
{
return GetPrefixedSimpleProperty(c_CaptionFocalLength, c_ExifFocalLength);
}
//
// EXIF ISO rating
//
function GetFormattedIsoRating()
{
return GetPrefixedSimpleProperty(c_CaptionIsoRating, c_ExifIsoSpeedRating);
}
//
// If strValue is not empty, add it to the array
//
function AddAvailableExifFieldToArray(availableFieldsArray, strValue)
{
// If we have a string, add it to the end of the array
if (strValue.length > 0)
{
availableFieldsArray[availableFieldsArray.length] = strValue;
}
}
//
// Extract the year from the EXIF date-taken
//
function GetYearFromDateTaken()
{
var strResult = new String("");
// Get the EXIF date taken
var strSource = GetRawExifValueIfPresent(c_ExifDateTimeOriginal);
if (strSource.length)
{
// Find the first colon
nIndex = strSource.indexOf(":");
if (nIndex >= 0)
{
// Copy up to the first colon
strResult = strSource.substr(0, nIndex);
}
}
// If we don't have a string, use today's date
if (strResult.length == 0)
{
strResult = ((new Date()).getYear() + 1900).toString();
}
return strResult;
}
//
// Format the copyright string
//
function GetFormattedCopyright()
{
// Start with the copyright string
var strResult = new String(c_CaptionCopyright);
// Get the year
var strYear = GetYearFromDateTaken();
if (strYear.length != 0)
{
// Append it (after a comma and a space)
strResult += ", " + strYear;
}
return strResult;
}
//
// Get all of the interesting EXIF fields, format them, and put them in a comma
// separated string for display.
//
function GetAllAvailableFields()
{
// Add all of the fields to the array
var AvailableFields = new Array;
AddAvailableExifFieldToArray(AvailableFields, GetFormattedModel());
AddAvailableExifFieldToArray(AvailableFields, GetFormattedExposureTime());
AddAvailableExifFieldToArray(AvailableFields, GetFormattedAperture());
AddAvailableExifFieldToArray(AvailableFields, GetFormattedFocalLength());
AddAvailableExifFieldToArray(AvailableFields, GetFormattedIsoRating());
AddAvailableExifFieldToArray(AvailableFields, GetFormattedGpsData());
AddAvailableExifFieldToArray(AvailableFields, GetFormattedDateTimeTaken());
// Turn it into one big string
var strResult = new String;
for (nCurrentEntry = 0; nCurrentEntry < AvailableFields.length; ++nCurrentEntry)
{
if (nCurrentEntry != 0)
{
strResult += ", ";
}
strResult += AvailableFields[nCurrentEntry];
}
return strResult;
}
//************************************************************************
//
// Begin script
//
//************************************************************************
function Main()
{
if (app.documents.length > 0)
{
// Save the old background color and ruler units
var oldRulerUnits = preferences.rulerUnits;
var oldBackgroundColor = backgroundColor;
try
{
// Turn off dialog boxes
displayDialogs = DialogModes.NO;
// Use inches for our scale
preferences.rulerUnits = Units.INCHES;
// Decide which axis is longer
var nLongAxis = (activeDocument.height.value > activeDocument.width.value) ? activeDocument.height.value : activeDocument.width.value;
// Calculate the border thickness
var nBorderThickness = nLongAxis / 400;
// How big do we want the font?
var nFontHeight = nLongAxis / 70;
// Calculate the text area height
var nTextAreaHeight = nFontHeight * 3;
// Convert the font size to points
var nFontHeightInPoints = nFontHeight * 72;
// Add the frame
backgroundColor = colorFrame;
activeDocument.resizeCanvas(activeDocument.width.value + nBorderThickness*1, activeDocument.height.value + nBorderThickness*1, AnchorPosition.MIDDLECENTER);
// Save the bottom of the image frame before we add the caption area
var nBottomOfFrame = activeDocument.height.value;
// Add the caption area
backgroundColor = colorCaptionBackground;
activeDocument.resizeCanvas(activeDocument.width.value, activeDocument.height.value + nTextAreaHeight, AnchorPosition.TOPCENTER);
// Create the caption ("\u000D" is a new-line)
var strCaption = GetFormattedCopyright() + "\u000D" + GetAllAvailableFields();
// Create the text layer
var newTextLayer = activeDocument.artLayers.add();
newTextLayer.kind = LayerKind.TEXT;
newTextLayer.textItem.font = c_CaptionFont;
newTextLayer.textItem.position = [nBorderThickness, nBottomOfFrame + nFontHeight*0.8 + nBorderThickness];
newTextLayer.textItem.size = nFontHeightInPoints;
newTextLayer.textItem.color = colorText;
newTextLayer.textItem.contents = strCaption;
}
catch (e)
{
alert(e);
}
// Restore the background color and ruler units
backgroundColor = oldBackgroundColor;
preferences.rulerUnits = oldRulerUnits;
}
else
{
alert("You don't have an image opened. Please open an image before running this script.");
}
}
Main();
Inviato da: buzz il Dec 12 2005, 12:11 AM
fantastico, ma come si usa?
Inviato da: robyt il Dec 12 2005, 01:29 AM
QUOTE(buzz @ Dec 12 2005, 12:11 AM)
fantastico, ma come si usa?
Devi salvare lo script con estensione .js e metterlo nella cartella script di photoshop (il percorso standard è questo "C:\Programmi\Adobe\Photoshop CS\Presets\Scripts") A questo punto aprendo il menu "File" troverai il nuovo script sotto il menu "Scripts"....... peccato che non funzioni!
Giorgioooooo,
premesso che non conosco molto bene java, quando cerco di utilizzare lo script mi dà il seguente errore:
Error 48: File or folders does not exist.
Line: 75
-> //@include "ExifHelpers.inc"
che faccio?
Inviato da: GiorgioBS il Dec 12 2005, 06:30 AM
? è un errore che a me non da...
ed è un file che non ho, quindi non cerca nulla di esterno... sicuro di aver copiato giusto?
Inviato da: robertogregori il Dec 12 2005, 06:47 AM
QUOTE(robyt @ Dec 12 2005, 02:29 AM)
Devi salvare lo script con estensione .js e metterlo nella cartella script di photoshop (il percorso standard è questo "C:\Programmi\Adobe\Photoshop CS\Presets\Scripts") A questo punto aprendo il menu "File" troverai il nuovo script sotto il menu "Scripts"....... peccato che non funzioni!
Giorgioooooo,
premesso che non conosco molto bene java, quando cerco di utilizzare lo script mi dà il seguente errore:
Error 48: File or folders does not exist.
Line: 75
-> //@include "ExifHelpers.inc"
che faccio?
Salve,
ho provato anche io (mi interessava il js), ma ottengo lo stesso errore
ciao e grazie
Roberto
Inviato da: spicchi il Dec 12 2005, 12:36 PM
Beh, in effetti l'errore è normale.... C'è scritto di INCLUDERE un file che si chiama ExifHelpers.inc ma il file non c'è.....
x Giorgio:
dovresti postare anche il contenuto di quel file.... Che è il + ed il meglio
Un saluto a tutti.
Inviato da: buzz il Dec 12 2005, 02:49 PM
ragazzi, sono un po' duro... ma adesso che ho rinominato il file in .js e messo tra gli altri .js di Ph.CS come lancio lo script dal programma?
non è un'azione e l'help non mi dice nulla...
Inviato da: robertogregori il Dec 12 2005, 03:04 PM
QUOTE(buzz @ Dec 12 2005, 03:49 PM)
ragazzi, sono un po' duro... ma adesso che ho rinominato il file in .js e messo tra gli altri .js di Ph.CS come lancio lo script dal programma?
non è un'azione e l'help non mi dice nulla...
file-> scripts...
e vedrai che compare il nome del file rinominato in js
ciao
roberto
Inviato da: epapa il Dec 12 2005, 11:04 PM
QUOTE(spicchi @ Dec 12 2005, 01:36 PM)
Beh, in effetti l'errore è normale.... C'è scritto di INCLUDERE un file che si chiama ExifHelpers.inc ma il file non c'è.....
x Giorgio:
dovresti postare anche il contenuto di quel file.... Che è il + ed il meglio
Anche a me da lo stesso errore alla linea 76 (uso CS su MAC), direi anch'io che manca un pezzo allo script... ma la cosa è interessante. Giorgio ci puoi aiutare, grazie
Inviato da: GiorgioBS il Dec 12 2005, 11:15 PM
giusto...
è nella stessa cartella dello script...
CODE
// EXIF constants
c_ExifGpsLatitudeRef = "GPS Latitude Ref"
c_ExifGpsLatitude = "GPS Latitude"
c_ExifGpsLongitudeRef = "GPS Longitude Ref"
c_ExifGpsLongitude = "GPS Longitude"
c_ExifGpsAltitudeRef = "GPS Altitude Ref"
c_ExifGpsAltitude = "GPS Altitude"
c_ExifGpsTimeStamp = "GPS Time Stamp"
c_ExifMake = "Make"
c_ExifModel = "Model"
c_ExifExposureTime = "Exposure Time"
c_ExifAperture = "F-Stop"
c_ExifExposureProgram = "Exposure Program"
c_ExifIsoSpeedRating = "ISO Speed Ratings"
c_ExifDateTimeOriginal = "Date Time Original"
c_ExifMaxApertureValue = "Max Aperture Value"
c_ExifMeteringMode = "Metering Mode"
c_ExifLightSource = "Light Source"
c_ExifFlash = "Flash"
c_ExifFocalLength = "Focal Length"
c_ExifColorSpace = "Color Space"
c_ExifWidth = "Pixel X Dimension"
c_ExifHeight = "Pixel Y Dimension"
function GetRawExifValueIfPresent(strExifValueName)
{
// Empty string means it wasn't found
var strResult = new String("");
// Make sure there is a current document
if (app.documents.length)
{
// Loop through each element in the EXIF properties array
for (nCurrentElement = 0, nCount = 0; nCurrentElement < activeDocument.info.exif.length; ++nCurrentElement)
{
// Get the current element as a string
var strCurrentRecord = new String(activeDocument.info.exif[nCurrentElement]);
// Find the first comma
var nComma = strCurrentRecord.indexOf(",");
if (nComma >= 0)
{
// Everything before the comma is the field name
var strCurrentExifName = strCurrentRecord.substr(0, nComma);
// Is it a valid string?
if (strCurrentExifName.length)
{
// Is this our element?
if (strCurrentExifName == strExifValueName)
{
// Everything after the comma is the value, so
// save it and exit the loop
strResult = strCurrentRecord.substr(nComma + 1);
break;
}
}
}
}
}
return strResult;
}
Inviato da: epapa il Dec 12 2005, 11:23 PM
QUOTE(GiorgioBS @ Dec 13 2005, 12:15 AM)
giusto...
è nella stessa cartella dello script...
[/code]
Grande grazie e mille, veramente molto utile, e complimenti!
Inviato da: buzz il Dec 12 2005, 11:45 PM
adesso funziona!!!
grande programma, grande programmatore.
Inviato da: robyt il Dec 12 2005, 11:50 PM
Grazie Giorgio.
Inviato da: robertogregori il Dec 13 2005, 12:04 AM
grazie anche da parte mia!
penso che personalizzerò alcune parti (es. formattazione data), ma come base e' fantastica.
peccato solo che non riesca ad estrarre gli ISO, dato come d70 gestisce il metadato; se qualcuno sà dove si trova il dato iso ci si potrebbe sempre provare.......
grazie
roberto
Inviato da: Luigi Gasia il Feb 8 2006, 06:17 PM
QUOTE(robyt @ Dec 12 2005, 01:29 AM)
Devi salvare lo script con estensione .js e metterlo nella cartella script di photoshop (il percorso standard è questo "C:\Programmi\Adobe\Photoshop CS\Presets\Scripts") A questo punto aprendo il menu "File" troverai il nuovo script sotto il menu "Scripts"....... peccato che non funzioni!
Mi indicate come devo fara?
Ho selezionato tutto lo script (il secondo postato da Giorgio) poi ho cercato di metterlo nella cartella scripts di photoshop, ma seguendo il percorso sopra indicato dopo photoshop CS non trovo la cartella Presets e poi Scripts.
Il mio programma è in italiano forse le cartelle sono nominate diversamente...
Aspetto vostri chiarimenti!
Luigi
Inviato da: giancarlo.melosi@tin.it il Feb 8 2006, 06:32 PM
... i file da aggiungere sono 2? Possono essere rinominati ABCD.js
oppure con nome specifico?
grazie
Inviato da: Luigi Gasia il Feb 8 2006, 06:39 PM
QUOTE(giancarlo.melosi@tin.it @ Feb 8 2006, 06:32 PM)
... i file da aggiungere sono 2? Possono essere rinominati
ABCD.js
oppure con nome specifico?
grazie
Quali?
Cmq non riesco a trovare la cartella dove devo copiare lo script di Giorgio...
Luigi
Inviato da: Gothos il Feb 8 2006, 07:12 PM
Seleziona e copia tutto il primo script postato da Giorgio, poi vai nella cartella script di PS e con il destro del mouse apri il menu e scegli nuovo/nuovo documento di testo.
Nel documento appena creato, c’incolli il contenuto dello script e il file di testo lo nomini exif.js.
Poi fai la stessa procedura per il secondo script postato da Giorgio, però questa volta il file di testo lo nomini ExifHelpers.inc.
Inviato da: Giuseppe78 il Feb 8 2006, 07:13 PM
Ottimo GIorgio...gli ho dato una ritoccatina perchè quando la foto è in verticale le scritte della seconda riga risultano più lunghe delle dimensioni della larghezza della foto stessa quindi non entrano.
Ho messo un ritorno a capo "tattico" che separa così le 3 righe: copyright, dati scatto, data...
Se qualcuno è interessato allego il file modificato o se avete risolto in maniera più brillante rimango in attesa...
Inviato da: Gothos il Feb 8 2006, 07:14 PM
La cartella la trovi in c:/programmi/Adobe/Adobe Photoshop Cs2/Presets/Scripts
Inviato da: Giuseppe78 il Feb 8 2006, 07:17 PM
...come al solito...ecco il file.
Va rinominato in .js che altrimenti non riuscivo ad allegarlo e ovviamente va cambiato il copyright all'interno...
G.
Inviato da: Gothos il Feb 8 2006, 07:34 PM
Giuseppe
Inviato da: maxter il Feb 8 2006, 07:49 PM
Ci sto provando anche io ed ho seguito le info fornite. Purtroppo poi facendo File>scripts non è presente la scelta: exif. Nella cartella scripts, tutti gli altri file, i cui nomi invece appaiono correttamente facendo File>scripts, hanno l'icona di una tazzina di caffè e sono del tipo Adobe java Script file; quelli che invece ho creato io sono dei documenti di testo. Dove ho sbaglaito?
Grazie a chi mi può aiutare.
Ciao
Inviato da: Marco Negri il Feb 8 2006, 07:53 PM
Ritengo questa interessante discussione "più armoniosa" se migrata in Nikon Software.
Un cordiale saluto
Inviato da: Gigios il Feb 8 2006, 07:56 PM
QUOTE(maxter @ Feb 8 2006, 07:49 PM)
Ci sto provando anche io ed ho seguito le info fornite. Purtroppo poi facendo File>scripts non è presente la scelta: exif. Nella cartella scripts, tutti gli altri file, i cui nomi invece appaiono correttamente facendo File>scripts, hanno l'icona di una tazzina di caffè e sono del tipo Adobe java Script file; quelli che invece ho creato io sono dei documenti di testo. Dove ho sbaglaito?
Grazie a chi mi può aiutare.
Ciao
se non ti compare devi selezionare scripts>browse> e poi selezionare il file andandolo a beccare nella cartella dovo lo hai salvato, a me va cosi
comunqe a me funziona a metà, cioè se carico lo scripts mi esce solo il copyright, le informazioni relative allo scatto non compaiono, perche ???
forse dipende dal fatto che il file è salvato in jpg ??
puo estrapolare solo dal Nef???
Inviato da: giancarlo.melosi@tin.it il Feb 8 2006, 08:18 PM
OK !
Tutto a posto.
GRAZIEEEEEEEEEEEEEE
p.s. nn ho ancora provato, sapete se funge anche con PS-5 e PS-element ?
Inviato da: Luigi Gasia il Feb 8 2006, 08:36 PM
Purtroppo a me non funziona, forse perchè la cartella script nella directory di photoshop non c'è. Il file postato l'ho rinominato e salvato nella cartella esempi di script, ma quando lo carico dal progamma mi da errore...
Cosa devo fare?
Luigi
Inviato da: muzzo il Feb 8 2006, 09:08 PM
non sono un esperto, ma cerco di spiegare il tutto al meglio
prima di tutto gli scripts funzionano in toto con pscs
mentre con pscs2 funziona solo il copywrite
i due file devo essere riposti seguendo questo percorso:
programmi
adobe
pscs o pscs2
predefiniti
scripts
qui col il tasto destro del mouse si sceglie nel menu a tendina
"documento di testo" una volta creato lo si apre e si incolla lo scripts
dopo di che si salva tutto e quindi si rinomina il file con l'estenzione "js per pscs"
e con "jsx per pscs2"
il secondo file si crea nello stesso modo ma va rinominato con l'estenzione "inc."
se volete il tutto può essere riposto in una unica cartella magari chiamandola "cornice_nikon"
saluti a tutti
max
Inviato da: maxter il Feb 8 2006, 10:50 PM
QUOTE(Gigios @ Feb 8 2006, 08:56 PM)
se non ti compare devi selezionare scripts>browse> e poi selezionare il file andandolo a beccare nella cartella dovo lo hai salvato, a me va cosi
comunqe a me funziona a metà, cioè se carico lo scripts mi esce solo il copyright, le informazioni relative allo scatto non compaiono, perche ???
forse dipende dal fatto che il file è salvato in jpg ??
puo estrapolare solo dal Nef???
Niente! Andando con il browse di File>scripts ed andando nella cartella dove è inserito, il file non si vede! L'estensione jsx o js è l'unica concessa dal browse e, nonostante il file sia exif.js o .jsx....non si vede! Eppure nella cartella c'è! Per me dipende propio dal tipo di file, che è comunque un documento di testo e non un Adobejavascript file come gli altri. Mah
Inviato da: Luigi Gasia il Feb 8 2006, 10:53 PM
Succede la stessa cosa anche a me... Dove si sbaglia?
Luigi
Inviato da: STE_01 il Feb 8 2006, 11:45 PM
prova a scaricare questo file e copiarlo nella cartella script di phtoschop
http://www.nicoliniservice.it/Cornice.js
Inviato da: STE_01 il Feb 8 2006, 11:57 PM
Scusa ho sbagliato file
questo funziona http://www.nicoliniservice.it/Stamp%20EXIF%20v2_2.js
Ciao ste
Inviato da: maxter il Feb 8 2006, 11:59 PM
Fatto. Almeno stavolta con file>script, si vede "cornice", ed è già un passo avanti. Però cliccando su File>scripts>cornice, almeno a me, da un errore, ovvero: <Reference Error: GetRawExifValueIfPresent is not a function>.
Inviato da: giancarlo.melosi@tin.it il Feb 9 2006, 12:40 AM
dovreste vedere qualcosa di simile
Inviato da: Gothos il Feb 9 2006, 11:03 AM
utilizzate Esplora risorse, trovate i file di testo che avete creato copiando e incollando gli script postati sopra in un file di testo, poi selezionate il file con il mouse, premete il tasto destro del mouse e scegliete rinomina .. usate i nomi che ho usato io e vedrete che tutto funziona.
il primo file (tanto per intenderci quello più lungo) lo chiamate AddExif.js
il secondo, cioè quello più corto, lo chiamate ExifHelpers.inc
nel primo file il nome non è molto importante ma l’estensione js lo è
nel secondo file invece il nome deve essere esatto quindi assicuratevi che la E e la H siano maiuscole!!
Inviato da: digix il Feb 9 2006, 07:26 PM
scusate ma a me neanche in questo modo funziona
e a voi?
Inviato da: Luigi Gasia il Feb 9 2006, 08:00 PM
QUOTE(Gothos @ Feb 9 2006, 11:03 AM)
il primo file (tanto per intenderci quello più lungo) lo chiamate AddExif.js
il secondo, cioè quello più corto, lo chiamate ExifHelpers.inc
Vi posto i due file che dovete solo copiare e rinominare nella cartella script...
Luigi
N.B. prima di rinominare il file AddExif.txt dovete cambiare il nome al copyright
Inviato da: giancarlo.melosi@tin.it il Feb 9 2006, 09:02 PM
N.B. prima di rinominare il file AddExif.txt dovete cambiare il nome al copyright
[/quote
altrimenti il Cr nn sarà tuo
Inviato da: Gibellino il Feb 9 2006, 09:23 PM
Per estrapolare i dati exif uso uno script che potete scaricare qui
http://www.joecolson.com/PrintEXIF/index.htm
Prima ho provato con quelli inviati su questo post ma non mi funzionavano,
poi ho provato con questo e funziona.
Gabriele
Inviato da: Walter Nasini il Feb 10 2006, 08:57 PM
ciao
vorrei un chiarimento sullo script:
ho installato i 2 file e PScs2 li gestisce senza problemi, ho editato il mio nome all'interno ma al ctermine dell'esecuzione dello script nella cornice creata trovo scritto solo il mio nome e la data mentre tutte le informazioni relative allo scatto nemmeno l'ombra, ora vorrei sapere se i dati di scatto si devono inserire automaticamente con i dati exif del file oppure devono essere scritti manualmente nello script ??
ho provato sia con i nef ed i jpeg della mia D70.
grazie
Inviato da: Walter Nasini il Feb 10 2006, 09:18 PM
tutto ok!!
era un problema del file exifhelpers.inc che non era compatibile con photoshop cs2, ho trovato la soluzione grazie a Raffaeli, che in un 'altro topic dice:
"l problema che con il cs2 scrive solo il copyright dipende dal fatto che nello script ExifHelper sono riportate delle variabile (che servono per identificare le chiavi usate dal CS2 per estrapolare i valori degli exif) che non corrispondono ai nomi usati dal cs2!!!"
per PSCS2:
/ EXIF constants
c_ExifGpsLatitudeRef = "GPS Latitude Ref"
c_ExifGpsLatitude = "GPS Latitude"
c_ExifGpsLongitudeRef = "GPS Longitude Ref"
c_ExifGpsLongitude = "GPS Longitude"
c_ExifGpsAltitudeRef = "GPS Altitude Ref"
c_ExifGpsAltitude = "GPS Altitude"
c_ExifGpsTimeStamp = "GPS Time Stamp"
c_ExifMake = "Make"
c_ExifModel = "EXIF tag 252704,00272"
c_ExifExposureTime = "EXIF tag 252704,33434"
c_ExifAperture = "EXIF tag 252704,33437"
c_ExifExposureProgram = "Exposure Program"
c_ExifIsoSpeedRating = "ISO Speed Ratings"
c_ExifDateTimeOriginal = "Date Time Original"
c_ExifMaxApertureValue = "Max Aperture Value"
c_ExifMeteringMode = "Metering Mode"
c_ExifLightSource = "Light Source"
c_ExifFlash = "Flash"
c_ExifFocalLength = "EXIF tag 252704,37386"
c_ExifColorSpace = "Color Space"
c_ExifWidth = "Pixel X Dimension"
c_ExifHeight = "Pixel Y Dimension"
function GetRawExifValueIfPresent(strExifValueName)
{
// Empty string means it wasn't found
var strResult = new String("");
// Make sure there is a current document
if (app.documents.length)
{
// Loop through each element in the EXIF properties array
for (nCurrentElement = 0, nCount = 0; nCurrentElement < activeDocument.info.exif.length; ++nCurrentElement)
{
// Get the current element as a string
var strCurrentRecord = new String(activeDocument.info.exif[nCurrentElement]);
// Find the first comma
// var nComma = strCurrentRecord.indexOf(",");
var nComma = 21;
if (nComma >= 0)
{
// Everything before the comma is the field name
var strCurrentExifName = strCurrentRecord.substr(0, nComma);
// Is it a valid string?
if (strCurrentExifName.length)
{
// Is this our element?
if (strCurrentExifName == strExifValueName)
{
// Everything after the comma is the value, so
// save it and exit the loop
strResult = strCurrentRecord.substr(nComma + 1);
break;
}
}
}
}
}
return strResult;
}
Inviato da: alberto_t il Sep 22 2006, 10:35 AM
Ciao a tutti - primo post -
Volevo segnalare un errore nello script padre del thread (c'è un @ davanti a "include" che genera l'errore di mancato reperimento del file .inc) che è stato corretto nello script "cornice.js(x)" allegato più avanti nella discussione.
Comunque non era per questo che importunavo: reperito lo script corretto, ottengo ancora un altro errore: "GetRawExifValueIfPresent not a function". Qualcuno mi può dire cosa significa?
grazie e a presto
Realizzato da: Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)