Git Product home page Git Product logo

nexiftool's People

Contributors

aerisg222 avatar vincentneo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nexiftool's Issues

Two, Imagewidth, and Imageheight ?

`
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..

image

How to write semicolon separated values in XPKeywords?

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?

Changing keywords

Hi there. I have some problems with editing field.
I need to change value in table:
image
Here is my code.
image
But this value not changing.
Instead, the value changes in another table:
image
Have you some thinks how to fix it?
Best regards

Niche feature request: "Serializable" tag class?

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

NExif corrupting files when writing Keywords tag

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
` ///


/// Set sFile Keywords using NExifTool and write to sFile + _7.tmp.jpg
///

///
///
public async static void SetTagsWithNexif(string sFile, string[] sTags)
{
List UPDATE = new List {
new SetOperation(new NExifTool.Tag("keywords", sTags)) };

        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.

XMP Category values

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

There is attached image, which caused issues:
img_0037

support file names with spaces

Getting file not found error when file path contains spaces

Proposed fix: Update ExifToolOptions.GetStartInfo to wrap rawFile in double quotes when building args.

WaitingForActivation status returned

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
Capture

List-type tags such as Keywords return concatenated string of all values.

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

Need Compiled projects

we could not open in vs2013
please provide compiled dll files or exe file here
it does not support my version of vs2013

Rounding values

How to run this lib with -n tag? I don't want to round my values

Feature proposal

Is it possible to read the from the IFormFile without saveing it first.
Regards nice lib saved me some time ๐Ÿ‘

Usage

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);
}

`

Extracting Jpeg from Raw Image

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.

Create/Modify values

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.

Error when trying to start the exiftool process. Please make sure exiftool is installed, and its path is properly specified in the options

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.