aerisg222 / nexiftool Goto Github PK
View Code? Open in Web Editor NEW.Net wrapper for the excellent ExifTool
License: MIT License
.Net wrapper for the excellent ExifTool
License: MIT License
How to run this lib with -n tag? I don't want to round my values
Is there a possibility to execute the following exif command using NExifTool:
exiftool -b -JpgFromRaw "D:\NEF.NEF" > "D:\NEFextract.jpg"
Here, exiftool will extract the embedded Jpeg
image from the NEF.NEF
file and save it as NEFextract.jpg
.
I assume we can use the FileToFileRunner class, but unsure on how to include the updates
field.
Any help would be much appreciated.
P.S. Couldn't find a discussion page, so posting it here.
Is it possible to read the from the IFormFile without saveing it first.
Regards nice lib saved me some time ๐
we could not open in vs2013
please provide compiled dll files or exe file here
it does not support my version of vs2013
Hi Mike,
There is a problem about input-output text formatting. I want to add "-E" option on the arguments. Because I have faced an encoding problem. ( exiftool/exiftool#127 )
Can you help me ?
Thanks.
Getting file not found error when file path contains spaces
Proposed fix: Update ExifToolOptions.GetStartInfo to wrap rawFile in double quotes when building args.
Due to the way Windows handles encodings it's currently impossible to read tags if the file path contains non-ASCII symbols (read more in exiftool's FAQ).
Consider changing exiftool calling logic to something like what was done in ExifToolWrapper
Is there any way to modify values and to write them back to a file? I checked the test examples but there seems to be no modifying example.
have installed into classlibrary NETFramework 4.6.1 and running code
public async Task Test(string srcFilename)
{
var et = new ExifTool(new ExifToolOptions{ExifToolPath = @"C:\users\xxx\exiftool.exe" });
var list = await et.GetTagsAsync(srcFilename);
// use list...
}
which point to the exiftool exe...am able to run it successfully from the cli
I am using Nexif from c# in a Visual Studio project to add keywords in the string array sTags to a file sFile and store the tagged file as sFile_7.tmp.jpg with the code below
` ///
var opts = new ExifToolOptions();
var et = new ExifTool(opts);
var result = await et.WriteTagsAsync(sFile, UPDATE, sFile+ "_7.tmp.jpg");
}`
If I call this function several times, where sFile is a file previously captioned with the code, the output file sometimes contains part of the input image (usually the bottom, but placed at the top on the output image), but with the remainder filled with the same colour, which appears to be one of the colours appearing in the input image.
Could you please post an example of how to use this class?
This is what I am trying to do but I don't know how to create an Operation.
`
public void WriteExifDNG(string filename, Dictionary<string, string> tags)
{
var updates = tags.Select(t => new Operation(new Tag(t.Key, t.Value)));
var nexif = new ExifTool(new ExifToolOptions());
nexif.WriteTagsAsync(filename, updates);
}
`
Hey, thanks for writing this tool!
I found issue with processing XMP Category values. It returns mixed values for photo with 2 recognized faces and some values for Region Extensions are missing:
Results from NExifTool:
XMP Toolkit: XMP Core 5.4.0
Region Area Y: 0.4605000.471000
Region Area W: 0.0440000.033000
Region Area X: 0.4450000.325500
Region Area H: 0.0590000.044000
Region Area Unit: normalizednormalized
Region Type: FaceFace
Region Applied To Dimensions H: 3024
Region Applied To Dimensions W: 4032
Region Applied To Dimensions Unit: pixel
Results from Exif Tool CLI:
XMP Toolkit : XMP Core 5.4.0
Region Area Y : 0.460500, 0.471000
Region Area W : 0.044000, 0.033000
Region Area X : 0.445000, 0.325500
Region Area H : 0.059000, 0.044000
Region Area Unit : normalized, normalized
Region Type : Face, Face
Region Extensions Angle Info Yaw: 270
Region Extensions Angle Info Roll: 0
Region Extensions Confidence Level: 99
Region Extensions Time Stamp : 1312152977276
Region Extensions Face ID : 3
Region Applied To Dimensions H : 3024
Region Applied To Dimensions W : 4032
Region Applied To Dimensions Unit: pixel
I am trying to use the following lines of codes
var et = new ExifTool(new ExifToolOptions());
var tags = await et.GetTagsAsync(@"C:\Temp\Uploads\3.png");
and I get the following exception.
System.Exception: Error when trying to start the exiftool process. Please make sure exiftool is installed, and its path is properly specified in the options. ---> System.ComponentModel.Win32Exception: The system cannot find the file specified
Note: I have already installed the Nuget package manager. Please let me know if I am missing something
I was hoping to read the tags out of a collection of images once, and save the information to a companion file to speed things up the next time I read the tags. When I try to do this with a JSON Serializer I get the below error:
System.Runtime.Serialization.InvalidDataContractException
HResult=0x80131500
Message=Type 'NExifTool.Tag' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. If the type is a collection, consider marking it with the CollectionDataContractAttribute. See the Microsoft .NET Framework documentation for other supported types. Source=System.Runtime.Serialization
It's probably not that common an operation, so I understand if this isn't something you can fix. If it's something you can look into there's more information on the whole process here: https://www.newtonsoft.com/json/help/html/SerializingJSON.htm
According to your write example
readonly List<Operation> UPDATES = new List<Operation> {
new SetOperation(new Tag("comment", COMMENT)),
new SetOperation(new Tag("keywords", new string[] { "first", "second", "third", "hello world" }))
};
it should be possible to write multiple values to a tag.
I'm looking for the correct syntax to write your above values
"first", "second", "third", "hello world"
as 4 separate values in the tag "XPKeywords".
The target is to write them to a *.jpg file and read them with the built-in windows 10 explorer.
Actually, your above code write the 4 values as
first|second|third||hello world
in the *.jpg file and the win 10 file explorer read it as only 1 value.
Could you please tell us, how to use your functions
WriteTagsAsync
or
OverwriteTagsAsync
with multiple values, separated by a semicolon as I would enter them manually in Win10 file explorer?
I am trying to change the IPTC keywords tag. The GetTagsAsync
method returns a tag with name "Keywords", but the value is a single string with all the keywords concatenated without separators. I would prefer a List<string>
, but at the very least we need quote marks and separators.
Then when writing the keywords using OverwriteTagsAsync
, how would I create the SetOperation
?
Thanks
`
Dim d = New ExifTool(New ExifToolOptions)
Dim _dirInfo As New IO.DirectoryInfo(_fl)
For Each filedet In _dirInfo.GetFiles("*.nef")
Dim lit = Await d.GetTagsAsync(filedet.FullName)
' Trace.WriteLine($"{lit.ToString}")
For Each vall In lit
' Trace.WriteLine($"{vall.Name}")
Trace.WriteLine($"{vall.Name} {" - "} {vall.Value}")
If vall.Name = "ImageWidth" Or vall.Name = "ImageHeight" Then
' Trace.WriteLine($"{vall.Name} {" - "} {vall.Value}")
' If vall.Name = "ImageHeight" Then
' Exit For
' End If
End If
Next
Next`
i got two imagewidth and imageheight ... i guess one is thumbnail image if yes then how can differentiate the two values and how to get exact file dimensions plz help..
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.