Strange behavior when opening RawTherapee from IMatch

Started by Stuntflyer, April 30, 2020, 12:47:46 AM

Previous topic - Next topic

Stuntflyer

I'm having an issue opening up RT from IMatch with the correct interface.

Screenshot #! is correct where the left side of the interface is visible. Screenshot #2 is incorrect where the left side is hidden. The guys over at RT think it's an IMatch issue. I'm not sure what is causing this this happen. The shortcut created used in Imatch for the RT program works fine outside of IMatch.

Here is the link to the RT thread. .https://discuss.pixls.us/t/opening-rt-from-imatch/17837/17

Mike








Mario

I don't understand. How do you "start" RT from IMatch?
And how could IMatch possibly influence how RT looks?

If you start RT via the "Open with..." command, IMatch asks Windows to open the other application.
If you start RT via a Favorite, IMatch instructs Windows to run the other application.
IMatch does never launch or interface with the application you start.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Stuntflyer

I don't understand. How do you "start" RT from IMatch?
I start RT when I want to edit a photo by dragging the photo to the RT favorite.

And how could IMatch possibly influence how RT looks?
I have no idea, Mario

If you start RT via the "Open with..." command, IMatch asks Windows to open the other application.
Doing this also creates the problem

All I know is that same shortcut, as the one I use for the Imatch favorite, opens the RT program correctly when used outside of the IMatch program.

M

Winfried

Just have a look at the rawpedia-Dokumentation:

----- Begin Quote ----
Usage:

    rawtherapee <selected dir>

        Start File Browser inside folder.

    rawtherapee <file>

        Start Image Editor with file.

    -w

        Do not open the Windows console. This option is available in Windows only. If you pass parameters to the RawTherapee executable it spawns a console window so that you can see the verbose output of your processing. Normally Windows closes this console directly after RawTherapee is terminated. To let you see the output we added a prompt which waits for you to hit a key before closing the console. By specifying -w no console will be opened and therefore no key press is needed. Useful if you want to invoke rawtherapee.exe in batch, e.g. from a PowerShell script. Please note that -w will have no effect for "Debug" builds where a console window will be opened unless you're starting RawTherapee from a console window already.

    -v

        Print the RawTherapee version number and exit.

    -R

        "Remote" mode, available since RawTherapee 5.2. When opening an image using "Open with" or by passing its filename as an argument, without using the -R option RawTherapee will open in "no-File-Browser" mode - that is a mode which lacks the File Browser and Queue tabs as well as the Preferences button. Using the new -R mode, RawTherapee will open in a full-fledged instance. Using -R also allows you to open an image in an already-running instance of RawTherapee, if that instance was also started using -R. The no-File-Browser mode exists for historical reasons when RAM requirements were higher and stability was worse. Now that RawTherapee's memory usage is optimized and it can quickly and reliably open folders with thousands of images, users may prefer using the -R mode by default.

    -h -?

        Display these commands.
----- End Quote ----

RawTherapee can open in one of two modes. If you just pass one file-name, RawTherapee start in "no-File-Browser" mode. If you open it with he -R open a full-fledged instance. There is no way to pass a list with files from different  directories to RawTherapee. Just one file or the whole directory.

Winfried




Mario

IMatch does not "open" RT via the command line or anything.

This is done by Windows as part of the drag & drop protocol handling. When you drag files from IMatch to an application icon, IMatch uses protocols inside Windows. Basically it calls a function in Windows, hands over the list of file names in a specific structure in memory and then Windows does the rest (highlighting the icon, starting the other application, etc.). IMatch does not even know which application is used as the target or if you just drop the files into Windows Explorer.

The same is true for the "Open" and "Open with..." commands. IMatch hands over the file names to Windows and tells it to launch the associated or specified application.

The other application must support the Windows shell protocols for open and drag & drop. This has to be implemented using the standard Windows functions for this purpose. Which means that this is a) optional and b) the other application can implement this in any way it sees fit. Most do the proper thing and "open" the dropped files (or the files provided by Windows during application startup). Some just start and ignore the dropped files. Some open the folder of the first file. Photoshop starts ACR if the files are RAW files, else opens them. All this is out of the control of IMatch - it just tells Windows to open the application with a list of files.

Your post seems to indicate that RT handles Windows drag & drop or shell open in a specific way, and this is what's causing this behavior.
Maybe creating a Favorite in IMatch with a command line that hands over the file names in the way RT likes them can solve this?

See External Tool Favorites
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Winfried

That is correct.
The main point is that RawTherapee has two modes.
- "no-File-Browser", used if one filename is passed by drag-and-drop
- "full-fledged"

to start RawTherapee from IMatch in "full-fledged"-mode you need something like a little cmd-file, i.e.
---
echo on
"C:\Program Files\RawTherapee\5.8\rawtherapee.exe" -R %1
---

Of course you can start this *.cmd-file from IMatch.


The main problem with RawTherapee (and this is a RawTherapee-problem) is that you cannot pass a list of files to RawTherapee: just one file. If you want to pass more than one file you need such a little script. At least it works on my system this way.

Winfried

Mario

An external tool Favorite (see https://www.photools.com/help/imatch/#fav_basics.htm?dl=h-19) can do this nicely. You can even specify the file name(s) via variables.
Note that Windows command lines have limits, you cannot pass more than a few dozen file names that way. This depends on the receiving app as well.

If RT does not implement the standard Windows shell and drag & drop protocols, this should be a work-around.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Stuntflyer