exiftool | Enhanced Java Integration for Phil Harvey 's ExifTool | REST library
kandi X-RAY | exiftool Summary
kandi X-RAY | exiftool Summary
This project represents the most robust Java integrations with Phil Harvey's excellent ExifTool available. The goal of this project was to provide such a tight, well designed and performant integration with ExifTool that any Java developer using the class would have no idea that they weren't simply calling into a standard Java library while still being able to leverage the unmatched robustness of ExifTool. All concepts of external process launching, management, communication, tag extraction, value conversion and resource cleanup are abstracted out by this project and all handled automatically for the caller. Even when using ExifTool in "daemon mode" via the -stay_open True command line argument, this project hides all the details required to make that work, automatically re-using the daemon process as well as eventually cleaning it up automatically along with supporting resources after a defined interval of inactivity so as to avoid resource leaks. The set of EXIF tags supported out of the box is based on the EXIF tags supported by the most popular mobile devices (iPhone, Android, BlackBerry, etc.) as well as some of the most popular cameras on the market (Canon point and shoot as well as DSLR). And lastly, to ensure that integration with the external ExifTool project is as robust and seamless as possible, this class also offers extensive pre-condition checking and error reporting during instantiation and use. For example, if you specify that you want to use Feature.STAY_OPEN support, the ExifTool class will actually check the native ExifTool executable for support for that feature before allowing the feature to be turned on and report the problem to the caller along with potential work-arounds if necessary. Additionally, all external calls to the process are safely wrapped and reported with detailed exceptions if problems arise instead of just letting unknown exceptions bubble up from the unknown system depths to the caller. All the exceptions and exceptional scenarios are well-documented in the Javadoc along with extensive implementation details for anyone wanting to know more about the project.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Returns a set of Exif tool support
- Determines if the given exif tool is supported
- Starts the external exif tool process
- Helper method for logging a message
- Shuts down the ExifTool instance
- Returns true if the given feature is enabled
exiftool Key Features
exiftool Examples and Code Snippets
Community Discussions
Trending Discussions on exiftool
QUESTION
I can get this data with the following code. But it runs too slow:
...ANSWER
Answered 2021-Jun-11 at 16:07If all you need is 'UserComment', then pass that as a parameter during your popen call:
QUESTION
I have a bunch of files like these in a directory, many thousands of them.
...ANSWER
Answered 2021-Jun-04 at 13:20I believe something like this would suffice:
QUESTION
This is what parameter substitution would be one by one (transforming a picture file name into a date) :
...ANSWER
Answered 2021-May-28 at 00:18You can't nest expansion operators like that. But you can just work with smaller substrings to get the result you want.
QUESTION
I'm trying to interact with an external command (in this case, exiftool) and reading the output byte by byte as in the example below. While I can get it to work if I'm willing to first read in all the output and wait for the child process to finish, using a BufReader seems to result in indefinitely waiting for the first byte. I used this example as reference for accessing stdout with a BufReader.
...ANSWER
Answered 2021-May-23 at 13:02You're not closing the child's stdin. Your stdin
variable is a mutable reference, and dropping that has no effect on the referenced ChildStdin
.
Use child.stdin.take()
instead of child.stdin.as_mut()
:
QUESTION
I'm building an Electron app that manages a collection of photographs on an NAS. That NAS has two logical volumes, named "alpha" and "beta". For reasons I want to understand (and fix!), my app gets an ENOENT error whenever it tries to run CLI tools against files on beta, but not when it runs CLI tools against alpha. Additionally, it is permitted to perform regular FS operations (e.g. readdir, stat, even rename) against files on both volumes without error. For example: the app first learns about the files on beta because it scans the filesystem using find
; that scan succeeds.
I'm using the CLI tool exiftool
to extract image metadata from all these files (e.g. dimensions, capture device, etc). Here's the command my app runs, using child_process.spawn:
ANSWER
Answered 2021-Mar-27 at 22:46Specifying the full path of the command worked:
QUESTION
The images are located in folders inside C:/photo.
I have original images and compressed images inside its subfolders and itself.
Here is a example of how the images are organized:
...ANSWER
Answered 2021-May-13 at 15:24Your command would be:
exiftool -if "$Filename=~/_compressed/i" -r -TagsFromFile %d%-.11f.%e -All:All C:\photo
This command will process the files in C:\photo
, check to make sure that _compressed
is in the name, and copy all tags from the file with the same name minus 11 characters from the end of the file's basename.
Because you want to recurse, you cannot use a wildcard to only process the compressed files (see Exiftool Common Mistake #2 and the
-r
(-recurse
) option).
If you want to only copy specific tags, you would replace -All:All
with -TAG1
-TAG2
… -TAGn
, replacing TAG#
with the actual tag names.
This command will not copy some tags like ICC_Profile
. You can copy color related tags by adding -ColorSpaceTags
after the -TagsFromFile
option.
This command creates backup files. Add -overwrite_original
to suppress the creation of backup files. If this command is run under Unix/Mac, reverse any double/single quotes to avoid bash interpretation.
QUESTION
I've been using pp
A while ago!
However when hiring another hosting, when I run the pp command the scripts do not run on the server
CentOS Linux release 7.9.2009 (Core) Perl v 5.32.1
Command using pp, host old
...ANSWER
Answered 2021-May-10 at 23:29You need to add the file html_entities.txt
to the archive.
The following seems to work for me:
Find the location of the file:
QUESTION
When in Powershell I can run the following command
...ANSWER
Answered 2021-May-04 at 15:15The problem is that the latitude and longtitude argumets are "attached" directly to the -GPSLatitute*
and -GPSLongtitude*
parameter names after the =
sign. (The -
initial character prevents PowerShell from invoking variable expansion - see GitHub issue #14587.)
One way to work around this is to wrap the -GPSLatitude*
and -GPSLongtitude*
parameters in "
quotes; e.g.
QUESTION
I'm running the following command to add multiple keywords to an image:
...ANSWER
Answered 2021-Apr-27 at 15:59See Exiftool FAQ #17
To prevent duplication when adding new items, specific items can be deleted then added back again in the same command. For example, the following command adds the keywords "one" and "two", ensuring that they are not duplicated if they already existed in the keywords of an image:
exiftool -keywords-=one -keywords+=one -keywords-=two -keywords+=two DIR
The NoDups
helper function is used to remove duplicates when they already exist in the file. It isn't used to prevent duplicates from being added in the first place.
QUESTION
I need to call a program with a list of file names, but I need to find and extract the first file on the list taken as sorted order and pass the rest to the program.
Specifically, I want to pass a list of files selected with the QTTabbar application launcher and execute exiftool so that the first file on the list is used for the "-TagsFromFile" option, and then process all of the rest of the files so that they get the "-AllDates" option applied. So my first attempt was:
...ANSWER
Answered 2021-Apr-12 at 15:19So your code was really close. All you needed to add were a few basic concepts to get the first argument into a variable which can be done by checking if a variable is defined or not. Then use the SET
command to rebuild all the arguments back into another variable. This requires delayed expansion as described in this question.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
Install exiftool
You can use exiftool like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the exiftool component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page