News:

If this site goes down it is because of the crappy DreamHost web hosting: They will disable your "unlimited traffic" web server if a single bot hammers the site with a moderate load.  If necessary, an alternate ExifTool forum page is available at https://sourceforge.net/p/exiftool/discussion/

Main Menu

.NET "wrapper" dll

Started by brain2cpu, September 13, 2013, 08:27:20 AM

Previous topic - Next topic

VeryKross

Thanks Phil - I'll play around with those options; hopefully the .Net wrapper will respect them :)

obetz

a quick look at the source code raised some questions, e.g.

Why does it use "exiftool(-k).exe"? As it is used with -stay_open, -k makes no sense IMO.

What happens if somebody passes a command dealing with more than one file? The return string is checked against "1 image files updated".

VeryKross

Hi Phil,

I wanted to loop back on this as it's proving to be a bit more troublesome to get this working with the C# wrapper than I first thought. I was wondering if there was any option in ExifTool to override the default newline conversion; instead of converting to periods, convert to a character(s) that are specified in the option (thinking along the lines of the -sep option).  This would allow me to specify an "unlikely" character, e.g. ~, that could be easily identified in the output string and converted back. Of course, that doesn't address saving multi-line text back to the metadata field, unless of course by specifying the same option while writing that you'd convert back to the proper newline character(s).

Thoughts?

Ken

Phil Harvey

Hi Ken,

Did you see FAQ 21?  There are many different alternatives for dealing with newlines.  I try to avoid adding new options unless absolutely necessary.

BTW, it isn't just newlines that are converted to ".".

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

Quote from: VeryKross on June 23, 2019, 12:49:10 AMI was wondering if there was any option in ExifTool to override the default newline conversion; instead of converting to periods, convert to a character(s) that are specified in the option (thinking along the lines of the -sep option).

I didn't read the whole thread, so I might be missing the point...

Take a look at adding the RepNL helper function to your .exiftool_config file.  You can then add -api "Filter=RepNL($_)" to the command and all New Lines, Carriage Returns, and Tabs will be escaped to \n, \r, and \t.  You can edit it to change to some other character sequence if you like.
Troubleshooting hints:
* Did you read FAQ #3 and use the command listed there?
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.

Phil Harvey

#35
@StarGeek: Very smart.  I'll add the API Filter option technique to FAQ 21.

- Phil

Edit:  FAQ updated.
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

jodi319

Hi Brian2cpu. I am doing development with C# (specifically Xamarin.forms). I am interested in your ExifTool wrapper. Question: can I use your wrapper to extract Exif data in JSON format; just like the original ExifTool can?

brain2cpu

Hi, no, there is no direct json support here, but you can easily convert the internal data structures to json.

nemethv

hi all -- appreciating the topic has been quiet for a while but 2 questions regarding the wrapper extension for vscode/c#.
- 1: is it possible and if so how to override the starting arguments and
- 2: is it possible to define on a per-extension basis that some exif-saves should go into xmp while others should be embedded?
thanks.

ps. "explain to me like to a five year old" pls.

brain2cpu

hello, I'm not familiar with vscode extensions so can't be of any help on this.