Sending multiple files to Photomatix?

Started by maxbelloni, October 17, 2023, 10:21:54 PM

Previous topic - Next topic

maxbelloni

Photomatix HDR images uses multiple input files to produce the final image.

I would like to be able to send multiple files all together to this application, but (of course) using the parameter {File.FullName} this is not possible (Photomatix just use the higlighted file of the selection). I've also tried to stack the files, just to check, but this too (of course again ) does not work.

Maybe there is an argument which sends all the selected files togeter to an external application like in this case? (maybe I'm dumb and idi not find it...)

Mario

When you drag files from IMatch to other applications, IMatch provides the files in the standard Windows file "drop" protocol. This is why you, for example, can drag any number of files from IMatch to Windows Explorer copy or move them. Or open any number of files in Photoshop, Affinity products etc.

But, this all depends on the "receiving" application. If you dran and drop files from IMatch on the Photomatix application, it must support the standard Windows drag & drop protocols. If it does not, there is nothing IMatch can do.
Many applications out there don't bother to support the standard protocols or are not equipped to do so.

Sometimes applications cannot be started by dragging files to their icon, but they accept dropped files when the application is already running. Sometimes they have no concept for this, like, e.g. Adobe Lightroom.

Your problem description is vague. You mention the {File.FullName} variable. Do you use an IMatch favorite for sending the files to the other application? If so, do you know which command line parameters it supports or how it deals with multiple files provided via the command line?


QuotePhotomatix just use the higlighted file of the selection 
What does that mean? When you drag files from IMatch to another application / icon, IMatch produces a standard HDROP record, containing all selected files. It is up to the other application if and how they deal with that. If the developers of the other application did not implement the standard Windows drag & drop protocols or only open the "first" file in the HDROP record, that's on them. IMatch cannot do anything about this.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

maxbelloni

Quote from: Mario on October 17, 2023, 11:35:04 PMYour problem description is vague. You mention the {File.FullName} variable. Do you use an IMatch favorite for sending the files to the other application? If so, do you know which command line parameters it supports or how it deals with multiple files provided via the command line?
Yes, I built an IMatch favorite (sorry, I did not mention before). Photomatix just use the higlighted (yellow border) file of the selection (see below)

Quote from: Mario on October 17, 2023, 11:35:04 PMWhat does that mean? When you drag files from IMatch to another application / icon, IMatch produces a standard HDROP record, containing all selected files. It is up to the other application if and how they deal with that. If the developers of the other application did not implement the standard Windows drag & drop protocols or only open the "first" file in the HDROP record, that's on them. IMatch cannot do anything about this.


See image below: I selected 3 images (Q1000578, Q1000577 , Q1000576), but only the highlighted in yellow (578) is opened by Photomatix. That is what I mean.



If I drag & drop the files selected from IMatch on the main window of Photomatix, it get all of them correctly, but it does not work if using the favorite (that's why I was thinking that there could be a specific argument to send all the selected files)

maxbelloni

Mario

#3
Does the other application accept multiple file names separated with a , on the command line?
Did you check their documentation? See Creating and Configuring to how IMatch provides multiple file names to the other application when you use the variable. Not all applications support this or they expect ; instead of , or whatnot...

Why don't you create a regular Applications Favorite for the other application? Does it not support that?
If you can drag and drop multiple files from IMatch to the application window successfully, it should work the same when you create a normal favorite for the application.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

maxbelloni

xx
Quote from: Mario on October 18, 2023, 08:59:52 AMDoes the other application accept multiple file names separated with a , on the command line?
Did you check their documentation? See Creating and Configuring to how IMatch provides multiple file names to the other application when you use the variable. Not all applications support this or they expect ; instead of , or whatnot...
Their documentation does not (unluckily) specifies how multiple file names can be sent. I'll check again and directly with them, eventually.

Quote from: Mario on October 18, 2023, 08:59:52 AMWhy don't you create a regular Applications Favorite for the other application? Does it not support that?
If you can drag and drop multiple files from IMatch to the application window successfully, it should work the same when you create a normal favorite for the application.
That is what I've done. Dragging and dropping a multiple file selection on the favorite (or opening the favorite when the multiple file has been aready selected) results in opening just the only active selected file in Photomatix (Q1000578, in the case shown above)

Again thanks for your patience... :)

Mario

Then the developers decided to handle that that way. IMatch provides all selected files via the official HDROP and shortcut features in Windows. If and how the receiving application deals with that is up to them. They may not support it at all, open all files sent or only the first one. This is not something the sending application (IMatch) has any control over.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

mopperle

#6
I have no problem with Drag&Drop to Photomatix Pro. Just checked it:
- selected 4 files in the IM file window
- dragged them to Photomatix, which asks to merge those files or just open them
2023-10-18 13.41.07 000.png
2023-10-18 13.42.10 000.png

Mario

Thanks for checking.
I think the OP wrote that drag & drop from IMatch to the Photomatix works.
Just not using a regular application Favorite or a external tool favorite in IMatch.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

maxbelloni

Thanks OP for the check! 8)

Well, I'll do in such way

Thanks!

maxbelloni







mopperle

Sorry, I overlooked that it works with Drag&Drop for him.
At least a favourite ending up like this does not work: xyz.exe "C:\images\123.jpg","C:\images\456.jpg","C:\images\789.jpg"
So I assume that parameters and/or a working directory is needed. Opened a ticket and will post the answer here.

maxbelloni

Quote from: mopperle on October 18, 2023, 05:19:36 PMSorry, I overlooked that it works with Drag&Drop for him.
At least a favourite ending up like this does not work: xyz.exe "C:\images\123.jpg","C:\images\456.jpg","C:\images\789.jpg"
So I assume that parameters and/or a working directory is needed. Opened a ticket and will post the answer here.
Too kind! Thanks again!

maxbelloni

jch2103

One note re drag & drop from IM into other applications: Some applications require using the Alt key while dragging and dropping multiple files. One example is Facebook; a standard drag & drop just opens files in a new browser window instead into the Facebook 'Add Photos/Videos' dialog box. Drag & drop while holding down the Alt key works well in this situation. 

John

Mario

Relevant section in the IMatch Help System: File Window the Alt key.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

maxbelloni

I've done some test:

Dragging and dropping selected multiple files from IM to PhotomatixPro works (it open all them together to start a HDR using all the files). Using ALT when doing this looks to be not so important: with or without ALT, in this specific case, it works anyway in the same manner.

After a check with Photomatix support, I tried to run PhotomatixPro from command line, and passing the list of the files as argument it works  (again, it open all them together to start a HDR elaboration using all the files), opening the window to build a HDR image with all the ones passed. Example:

c:\program files\photomatixpro\photomatixpro 123.jpg 456.jpg 789.jpg

 My conclusion is that (probably) everything may work correctly if IM could pass the complete list of the selected files (and not only the highlighted one, as {File.FullName} does) as argument for the Application Favorite. 

maxbelloni

As for now, when writing the Favorite I didn't find an argument which perform this (something like {File.FullNameSelected}?). Maybe (not su unlikely...) I'm dumb and it's already present somewhere, or it could be a good idea to implement it (thet would be good for other similar applications too). What does think about this Mario?

BTW, Googling, by pure chance I discovered that Exposure X6 supports passing multiple filenames to external applications.

maxbelloni

Mario

#14
QuoteMy conclusion is that (probably) everything may work correctly if IM could pass the complete list of the selected files (and not only the highlighted one, as {File.FullName} does) as argument for the Application Favorite.
As I said, IMatch does exactly that, see documentation. Click on the Preview button to see the command line IMatch produces for your external tool favorite.

For example, when I select 4 files for an external tool favorite, the preview shows:

c:\tools\tool.exe  "C:\data\images\London\albert-memorial.jpg","C:\data\images\London\animals-731213_1920.jpg","C:\data\images\London\architecture-2715_1920.jpg","C:\data\images\London\architecture-2892_1920.jpg",
I use "{File.FullName}", as the variable.
The "" are required in case the file names or folder names contain blanks. And the , is used to separate the file names.

The fully qualified file names of the 4 selected files are provided via the command line. Perfect.
If the receiving application can deal with this.

In your example, I see only file names, but no path. The file names are also not separated with a , but a blank (as it seems).
Where does the other application get the path from? Working dir?
You can also set the working dir with a variable.

And if the other application expects only file names but not path and a blank, use "{File.NameExt}"<blank>

to get

c:\tools\tool.exe "albert-memorial.jpg" "animals-731213_1920.jpg" "architecture-2715_1920.jpg" "architecture-2892_1920.jpg"
IMatch favorites are very flexible. If you know what the other application expects on the command line, there is a very good chance that can produce exactly that output using IMatch variables and the other features favorites provide.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

mopperle

I'm currently in contact with Photomatix. When I run this:
QuoteC:\Program Files\PhotomatixPro7\PhotomatixPro.exe  "C:\Users\XYZ\Pictures\IMatch temp import\IMG_E2521.JPG","C:\Users\XYZ\Pictures\IMatch temp import\IMG_E2522.JPG","C:\Users\XYZ\Pictures\IMatch temp import\IMG_E2523.JPG"
I get this error from Photomatix:
2023-10-19 16.39.37 000.png

When I select only one image, it works fine.
But let's wait for their answer

mopperle

Quote from: Mario on October 19, 2023, 05:22:10 PMYou can also set the working dir with a variable.

And if the other application expects only file names but not path and a blank, use "{File.NameExt}"<blank>
Also tried this with a working directory wherer the files are:
C:\Program Files\PhotomatixPro7\PhotomatixPro.exe  "IMG_E2521.JPG","IMG_E2522.JPG","IMG_E2523.JPG"

and get the error
2023-10-19 20.19.14 000.png

but it works with this setup (a blank after the variable):
2023-10-19 20.24.39 000.png

Mario

#17
Sure. In your working example, you used only the file name, separated with a blank.

This is why IMatch allows you to use variables and has the "separate variable result for each file by" option.
Because if you include the separator in your variable (in your case, a blank) the last file name would also have that separator. It makes no difference in your case, but if the other application expects ; or , it is better to use that option and not add the separator to the variable.

I don't know the application you are trying to launch. I don't know if and which command line parameters it supports. You have to make some experiments and work with their support.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

maxbelloni

Well, solved!

I put {File.FullName} in the Argument filed (as I wrote above), not in Variables. Moving it to Variable made it working!

My mistake.

BTW: separating the filenames with the comma generates to me too the same error that occurred to O

Thanks to all for the help!

maxbelloni

mopperle

Exactly, the solution is to use only a "blank" as separator.