Magic Lantern Forum

Using Magic Lantern => Post-processing Workflow => Timelapse Postprocessing => Topic started by: dmilligan on August 15, 2013, 02:47:54 AM

Title: Batch HDR Toning Script for Photoshop
Post by: dmilligan on August 15, 2013, 02:47:54 AM
So for a long time it has annoyed the crap out of me that there is no way to automate the HDR toning process in photoshop (for the purpose of timelapse, etc.). Searching the internet, pretty much all you find is people telling you to use some other software to do it like photomatix. Well I don't freakin' want to buy another piece of software when I've already dropped a boat load on photoshop and it should, at least in theory, be able to do this.

After scraping bits of scripts together I found from across the internet and single stepping through the MergeToHDR.jsx script built into photoshop to figure out how it works, I finally have come up with a script that can do this.

https://github.com/davidmilligan/PhotoshopBatchHDR/blob/master/Batch%20HDR.jsx

Guide on how to use this script:

https://github.com/davidmilligan/PhotoshopBatchHDR/wiki

Being a C++/C# developer by day, non-strongly-typed languages like javascript annoy the hell out me, and the poor documentation and crappy IDE of ExtendScript only make matters worse. So if anyone with more javascript/adobe scripting experience would like to help me polish this script up, that would be great.

Modify the 'numberOfBrackets' variable to tell the script how many brackets are in each shot, the MergeToHDR script will automatically determine which is which (+EV, - EV, etc) so the bracket order doesn't matter just as long as you always take the same number of brackets for each shot.

The script is currently not able load individual raw files for HDR toning (i.e. numberOfBrackets = 1) which is something I'd like to be able to do since even a single exposure raw file is 14bit which is higher dynamic range that an 8 bit screen, and allow HDR time lapses without as many actuations. I don't really know how to raw files; you have to specify a bunch of options when you try to open a raw file, and I don't really know what they should be. The MergeToHDR script will load raw files but it requires a minimum of 2 files so it wont work with individual files, and I can't really figure out what it's doing to load raw files (or at least I haven't tried really hard to figure it out yet).

Once I figure out how to load single RAW files I think this script could also be very useful for those doing RAW video, as it would provide a way to do HDR toning effects on RAW video footage.

I'd also like to figure out a way to avoid hard coding the toning settings in the script, perhaps reverse engineer the HDR preset file format and have the script load a preset file and use the values in that.

Also, I'm using photoshop CC, so I'm not sure if it works on earlier versions, but it should, as I don't think adobe has changed any of the HDR stuff in a while.
Title: Re: Batch HDR Toning Script for Photoshop
Post by: dmilligan on August 17, 2013, 09:14:31 PM
Cleaned up the script a bit and implemented a UI. I put it up on github:

https://github.com/davidmilligan/PhotoshopBatchHDR/blob/master/Batch%20HDR.jsx

Place the script in '[Photoshop Dir]/presets/scripts' and it will show up in the automate menu of photoshop
Title: Re: Batch HDR Toning Script for Photoshop
Post by: Joachim Buambeki on October 13, 2013, 07:12:31 PM
Great work David.
I would love to see this developed further - not beeing able to batch HDRI creation with Bridge and PS creation also annoyed the hell out of me...

A few questions:
- How to output 32bit TIFF files? I can choose .tiff as output, but the option to choose bitdepth is stuck at 8 bit and greyed out. I am using PS CC on Win8.
- Would it be possible to get 32bit DNG files by sending the TIFF files internally to the Adobe DNG converter? If yes, the option the create lossy, lower res proxies would be great
- When processing RAW files the .xmp sidecard files seem to be ignored, could your script take them into account?
I am asking because the default settings are not optimal for HDR image creation (see here (http://www.hdrlabs.com/news/index.php?id=1276328416487110799)), also I would like to remove CAs and lens distortion in that step aswell.
 

Thanks again for your effort!
JB
Title: Re: Batch HDR Toning Script for Photoshop
Post by: dmilligan on October 13, 2013, 08:59:09 PM
1. You should be able to select 32bit tiff, you have to select tiff first then the bit depth should become enabled (it's disabled for jpeg b/c jpeg only supports 8bit).   If you select 32 bit, the tone mapping will not be applied, the images will simply be merged into 32bit float.
2. No, not possible
3. Also not possible, photoshop cannot operate on CFA (raw undebayered) data directly, and there's no way and no reason to try to undebayer it once you've processed it. (This is why you get the ACR dialog when you try to open a RAW image, it has to be debayered into 3 channel RGB before photoshop can work with it).
4. I'll see what I can do, you can always just preprocess them with bridge first into 16 bit tiff. BTW, that article is about Lr, afaik Lr and ACR are not the same and operate differently, so IDK if the stuff in the article is applicable to this situation. I've never had an issue with losing highlight detail in HDRs, that article doesn't make much sense to me either. "mushed" is not exactly a very mathematical explanation. You can always assign more DR to the highlights with a curve if you feel they are too compressed.
Title: Re: Batch HDR Toning Script for Photoshop
Post by: Joachim Buambeki on October 13, 2013, 10:46:15 PM
Thanks for your fast reply David!

1. You should be able to select 32bit tiff, you have to select tiff first then the bit depth should become enabled (it's disabled for jpeg b/c jpeg only supports 8bit).   If you select 32 bit, the tone mapping will not be applied, the images will simply be merged into 32bit float.
After selecting TIFF as output both compression and bit depth are greyed out (the first one makes sense of course)

Quote
2. No, not possible
You mean DNG is not possible, right? AFAIK you can call the DNG converter from Adobe so I thought it should be possible to feed it with those (intermediate) 32bit TIFF files. If that works, proxy creation should also be doable if I am not mistaken.

Quote
3. Also not possible, photoshop cannot operate on CFA (raw undebayered) data directly, and there's no way and no reason to try to undebayer it once you've processed it. (This is why you get the ACR dialog when you try to open a RAW image, it has to be debayered into 3 channel RGB before photoshop can work with it).
I am not sure what you mean by that, but if you probably understood me wrong:
The DNGs created from 32 bit TIFF files are not CFA data, they are just an 32bit float file in a convenient DNG container (meaning the data has been debayered before the merging).

Quote
4. I'll see what I can do, you can always just preprocess them with bridge first into 16 bit tiff. BTW, that article is about Lr, afaik Lr and ACR are not the same and operate differently, so IDK if the stuff in the article is applicable to this situation. I've never had an issue with losing highlight detail in HDRs, that article doesn't make much sense to me either. "mushed" is not exactly a very mathematical explanation. You can always assign more DR to the highlights with a curve if you feel they are too compressed.
Though "mushed" is indeed not a very mathematical term, that guy one of THE authorities for HDRI, I am surprised you haven't heard of him.
LR and ACR use the same RAW conversion engine so their output is identical - meaning what the writes is also applicable to ACR. Though I am a technical layman it makes perfect sense to me what he says:
When using the default ACR settings you basically apply an s-curve to the image (it not that simple actually, because contrast affects the midtones more than the highlights/shadows of the image, see also here (http://forums.adobe.com/message/5327886#5327886)), so apart from the camera curve itself (sensors aren't perfectly linear as you know) the HDR merger has figure out how to reverse that midtone contrast that is applied. In PV2010 you could linearise an image by setting everything to zero, when you convert those values to PV2012 you get the following:
Code: [Select]
-1 EV
-33 Contrast
+25 Blacks
a slight reverse s-curve
Which is pretty similar to what he is suggesting (I am also not sure not accurate that conversion from PV2010 to PV2012 by ACR is, because a few test I did myself brought me to the conclusion it might be not).
Converting the sequence to TIFF with lens corrections applied first and then using your script is certainly doable, but that another manual step I would love to avoid. ;-)

Since I can't test the TIFF option:
Are the TIFF files compressed in any (lossless/lossy) way to save space? If no, would you consider implementing it?
Title: Re: Batch HDR Toning Script for Photoshop
Post by: dmilligan on October 14, 2013, 04:38:31 AM
I didn't realize you could put RGB data into a DNG, so I guess you're wanting that so you can use ACR on the result? since technically there would be no difference in the actual data contained in the file, and tiff is much more widely supported than dng.

I was under the impression that Lr and ACR actually used different raw processing engines, but I guess not (ppl talk about how they feel Lr is superior to ACR, I've never noticed a difference myself, but I assumed they knew what they were talking about).

That's kind of annoying that process 2012 applies nonlinear corrections even if you have all settings 0, but I don't see how it could, practically speaking, have much of an effect on the final image. Yes, you are throwing away some small amount of information in applying a non-linear transformation, but compared to the amount of information you end up with in the final HDR, it seems totally insignificant to me. Perhaps if it really is significant, the script should just automatically use the best ACR settings for you. I think an experiment would be in order.
Title: Re: Batch HDR Toning Script for Photoshop
Post by: Audionut on October 14, 2013, 05:26:29 AM
I was under the impression that Adobe software always applied nonlinear corrections, regardless of the process used.  I wonder how much of this is the result of flickering in your timelapses dmilligan.  You could try processing the parts of your last timelapse that required manual adjustment in a different raw processor and observing the results.
Title: Re: Batch HDR Toning Script for Photoshop
Post by: Joachim Buambeki on October 14, 2013, 10:27:46 AM
Yes, the goal is to use ACR to process the endresult. I know that there is way to call the Adobe DNG converter from another programm, because that is what LRtimelapse does. The option to create those those DNGs directly would be just a big timesaver, also have can get a preview of the tonemapped file embedded into the DNG, which is not only nice for browsing those files in Bridge or another programm but also good for processing the files in LRtimelapse (it does only work on Jpeg instead of linear data, so having those JPEGs would actually help to improve the final output).

About LR vs ACR:
Sometimes people don't know what they are talking about. ;-)

As I said, with the settings shown above applied you get (something pretty close to) linear output, to goal is definitely to send files to the merger that have as little nonlinear processing applied as possible. I haven't made any conclusive tests, but I guess that introduces some sort of local flickering, because if you only have three nonlinear files to merge, there is a certain amount of guessing while reconstructing the linear files - which is totally fine for a single image - but it might result in flicker in certain tonal ranges (as Audionut pointed out) that are hard to impossible to remove for a deflicker tool since they only work best if the flicker is global.
There is also a similar phenomenon that I discussed with John Hable a while back: In the shots with the fastest shutter speed you get flicker because the shutter isn't 100% precise at speeds faster than 33ms (on Canon), though that problem seems to be less severe on Nikon than Canon. If you're interested in this google for "shutter flicker".

The reason why I don't want to use something else than ACR to create the intermediate files is the overall quality of the output, there is very little artifacting, jagged edges and other stuff compared to other converters. Apart from that, creating intermediate TIFF files with another programm would be a huge pain the butt.

PS: If I understood you correctly you weren't aware that you could tone your HDRIs in ACR, maybe you want to have a look at this, instead of using the HDR toning of HDRmerge Pro  (which is not that great IMO) you could call ACR for the 8/16bit files created with your script. If you do that it would be nice to have an option to render both 32bit and 8/16bit to be able to create a fast preview clip directly after the TIFF/DNG creation is finished.
Title: Re: Batch HDR Toning Script for Photoshop
Post by: dmilligan on October 14, 2013, 08:44:26 PM
I was under the impression that Adobe software always applied nonlinear corrections, regardless of the process used.  I wonder how much of this is the result of flickering in your timelapses dmilligan.  You could try processing the parts of your last timelapse that required manual adjustment in a different raw processor and observing the results.

This would be true for "automatic" corrections, but in general there's no reason non-linear transformations should cause flicker, assuming you are applying the same non-linear transformation to each photo. It could make existing flicker worse (or better, just depends on the nature of the flicker and the type of transform), but I don't see how it would cause flicker.

All of the manual adjustments I had to do were because I gave post deflicker bad settings for the particular scene, and it's estimated exposure compensation was just wrong. In some cases I was able to fix the flicker by selecting a long sequence of photos where AETTR kept choosing the same expo parameters for a long time, and set their exposure value to all the same value (post deflicker chose different exposure value despite the fact the AETTR was not changing any exposure parameters, so post deflicker was actually causing flicker that was not present to begin with).

Anyways, after that OT,

There is no way to save as DNG in photoshop, which means there's no way for this script to do it without first saving to some intermediate file format that photoshop supports, also I see no reason to convert to DNG since the all that is going to happen is that TIFF data is going to be stored inside a DNG wrapper, and you can open and tone any file format with ACR. In Br, right click on any photo(s) and go to "Open in Camera RAW..."  This works with any format (I just tried jpeg, tiff, and psd to be sure). You can do the same in photoshop, in the open dialog just select "Camera Raw" as the Format.  Or just use Lr (apparently it's the same thing).

If you want to tone with ACR (which BTW, I do know you can do this for HDR), the best way is going to be with Br or Lr. Use my script to do your merge, save as 32bit, then use Br or Lr or whatever to do the toning. If you do it like this you should be able to realtime preview the results of the toning (on any image in the sequence), and even setup a non-destructive workflow from the merge step onward since AE recognizes the .xmp files that ACR creates and you can dynamic link to Premiere for compilation/finishing touches.

I think I fixed the problem with not being able to select 32bit TIFF, see if the latest version on github works
Title: Re: Batch HDR Toning Script for Photoshop
Post by: Joachim Buambeki on October 15, 2013, 12:04:33 AM
Thanks for the updated script, everything works now as it should!

Regarding the nonlinear corrections:
It is a problem that occurs if you use use more than the exposure slider and curves, see this thread (http://forums.adobe.com/message/5582609#5582609) and what one of the Adobe developer says:

Quote from: MadManChan2000
Some (many) controls in the Basic panel in PV 2012 are now image-adaptive.  They use the image content itself to determine the range and behavior of the controls.  Highlights, Shadows, and Clarity are among the controls that respond most strongly to the image content.  These were not designed with temporal coherence in mind.  This is why you can expect to see temporal artifacts if you are to try to apply these controls to individual still frames.

For basic tone effects, I would suggest instead using the Parametric and/or Point curves to minimize temporal issues.

So depending on image content you get flicker - beeing severe or not (maybe even invisible).


Regarding the UI of the script:
- I would suggest to move the "Deghosting" up and next to the "Alligning" checkbox because it has nothing to do with the toning part.
- Would it be possible to add an automatic filtering for image files, so one doesn't have to type in *.CR2/NEF or whatever the file format is that you want to process? Knowing me, I would forget that filter in 1 of 5 cases... :-/
- Could the toning part be made collapsible?
- Can I set new defaults? If not, where can I change the defaults to TIFF/32bit output in the script?

Did you look into reading the metadata to get lens correction right before the merging process? I would also avoid sharpening before the merging because AFAIK that also can cause artifacts (Blochi also recommends to turn it off).
What do you think about creating 8bit AND 32 output at the same time? Or is that not possible within the architecture of the merger? It would be nice to have a tonemapped lowres (maybe 1920*1280) file ready after the merging to render out a preview quickly - rendering the fullres 32bit TIFFs in After Effects with ACR takes veeery long as you surely know.

The reason why I am interested to have direct DNG output is the following:
LRtimelapse (which I use extensively) is reading the embedded Jpegs in a RAW or DNG file to do the deflicker, so, to get it to work you need a Jpeg file.
This would save me the another manual step by having to go through Bridge or the DNG converter.
Anyway, it is your script and I am really happy you wrote it!
Title: Re: Batch HDR Toning Script for Photoshop
Post by: dmilligan on October 15, 2013, 03:30:49 AM
So I was looking at MergeToHDR.jsx, the script written by Adobe that is builtin to photoshop (my script simply calls certain functions in this script), and it appears that it sets some kind of special flag in ACR that tells ACR to output a linearized image, and ignores all the xmp exposure settings. So this is actually ideal and what you were trying to do with the ACR settings that supposedly give you close to linear output. This is what photoshop is actually doing during an HDR merge, so the ideas in that article about optimizing ACR settings for HDR are just flat out wrong, photoshop basicially optimizes this itself automatically.
Code: [Select]
// Set flag for Camera raw asking for linear response files.
mergeToHDR.linearizeCamRawFiles = true;

Maybe we can exploit this to get linear data out of ACR for other purposes?

- I would suggest to move the "Deghosting" up and next to the "Alligning" checkbox because it has nothing to do with the toning part.
Done

- Would it be possible to add an automatic filtering for image files, so one doesn't have to type in *.CR2/NEF or whatever the file format is that you want to process? Knowing me, I would forget that filter in 1 of 5 cases... :-/
Change line 52

- Could the toning part be made collapsible?
I can hide it, but I can't collapse it. It would just disappear and the window would stay the same size, with a large blank spot in the middle. ScriptUI is rather limited and quirky when it comes to layout. I will make it greyed out though, so it is clear that toning is not done when outputing 32 bit.

- Can I set new defaults? If not, where can I change the defaults to TIFF/32bit output in the script?
line 329 and 333

What do you think about creating 8bit AND 32 output at the same time? Or is that not possible within the architecture of the merger? It would be nice to have a tonemapped lowres (maybe 1920*1280) file ready after the merging to render out a preview quickly - rendering the fullres 32bit TIFFs in After Effects with ACR takes veeery long as you surely know.
possible, but will take some work, main difficulty is a way to specify such a setting in the UI.
Title: Re: Batch HDR Toning Script for Photoshop
Post by: Joachim Buambeki on October 16, 2013, 01:48:17 AM
The latest version works fine for me aswell. Maybe the layout could be optimised further, but that can be done later.
Hiding the toning part is fine with me if it can't be made collapsible.
 
I wasn't aware about the fact that you *can* get linear data out of ACR - cool finding. I am sure this will be useful somewhere else.

I am not sure if Blochi is wrong, I suppose what he does with those specific settings is that he creates TIFFs with LR/ACR and heads over to another application to merge them to an HDRI file - if that is the case using those settings is very likely better than using the defaults - he probably isn't aware of the fact that you can get linear images out of ACR.
I invited him to comment on this and opened new a thread (http://www.hdrlabs.com/cgi-bin/forum/YaBB.pl?num=1381880537/0) about this script over at his small community  - maybe people over there have more ideas to improve/extend it even further.

Could you please have a look at the compression settings? Those TIFFs are terribly huge, I guess the script saves them without any compression, right? Maybe adding another dialogue in your script to set up different compression parameters might be a good idea.

Also, adding EXR to the output options might be another good idea, since that is the defacto standard for HDRIs AFAIK.


PS: While browsing around I found this (http://forums.adobe.com/thread/951680) - not sure if you are aware of it or if it is of any use (I can't use it in my version of CC, but maybe you have a look at the code) you, but I thought I might drop the link in here.

PPS: Why didn't you copy the more the detailed instructions you posted on the Adobe forums (http://forums.adobe.com/thread/1277672) to the opening post here aswell? Just curious...
Title: Re: Batch HDR Toning Script for Photoshop
Post by: dmilligan on October 16, 2013, 04:08:40 AM
Could you please have a look at the compression settings? Those TIFFs are terribly huge, I guess the script saves them without any compression, right? Maybe adding another dialogue in your script to set up different compression parameters might be a good idea.
done, you can choose lzw or zip (both lossless)

PS: While browsing around I found this (http://forums.adobe.com/thread/951680) - not sure if you are aware of it or if it is of any use (I can't use it in my version of CC, but maybe you have a look at the code) you, but I thought I might drop the link in here.
Yep, that was one of the scripts I found that inspired this script. That script just didn't do everything I wanted, but it was basically how I realized that there was an adobe script I could call to do this stuff.

PPS: Why didn't you copy the more the detailed instructions you posted on the Adobe forums (http://forums.adobe.com/thread/1277672) to the opening post here aswell? Just curious....
No one ever expressed any interest, so I never bothered to update the post. I did put them on the wiki on github, so I've updated the first post with a link to that
Title: Re: Batch HDR Toning Script for Photoshop
Post by: Joachim Buambeki on October 16, 2013, 04:10:51 AM
I just updated my post above while you replied. Please have another look at it again
Title: Re: Batch HDR Toning Script for Photoshop
Post by: dmilligan on October 16, 2013, 04:16:31 AM
exr is possible I think, but it's not a native format for photoshop so it requires a plug in iirc, I'm not sure how to do it, but I think that script you pointed out can do it, I'll see if I can figure it out
Title: Re: Batch HDR Toning Script for Photoshop
Post by: Joachim Buambeki on October 17, 2013, 09:19:37 AM
Isn't EXR native? I know there is the ProEXR plugin, but you only need that if have files with alpha, depth, whatever masks in it if I am not mistaken.

Thanks for the lossless option, unfortunatelly the savings aren't huge (~20%), maybe you could have a look a look at the other compression options aswell. 24bit Logluv and the the 16bit option (however that works) should be fine for HDRIs derived from photos without a visible loss in quality. For EXR I strongly recommend to implement lossy compression, you can save quite a good amount of space without visibly degrading the image.
I can send you more info on compression and file types if you need it, that stuff is just too much above my head to explain it properly.

Regarding the UI:
I would suggest to have different dropdowns:
File type: TIFF, EXR, JPEG, PSD
Compression: JPEG Q1-12 (you might reduce that to 6-11 to keep the dropdown compact, who uses the other values anyway?), NONE, LZW, ZIP, 24bit logluv, 16bit half, ZLIB, WAVELET, RLE, PXR24, (options not available for the chosen file format should be greyed out if possible)
Bit depth: 8, 16, 32 (options not available for the chosen file format should be greyed out if possible)

If you can/want implement the lowres proxies with user defined resolution, I would split the JPEG part from the rest and make that separate paragraph in the UI add checkboxes for both paragraphs to enable/disable them.
Since you can use Camera Raw as a filter even for 32bit Images since PS CC, you could also use that to tonemap the images instead of the HDRmerge Pro toning Options (which I personally don't like) and use the XMLs you talked about earlier. When using it as a filter, generating a second image as Proxy should be easy within the scripting laguage if I am not mistaken.
Title: Re: Batch HDR Toning Script for Photoshop
Post by: mikmac on October 17, 2013, 12:55:59 PM
great script, thanks!
For panoramas in HDR its marvelous, but i have one problem.
For 3-pics HDR it works flawlessly, but 5-pic bracket makes error all the time, during loading images to PS... regardless of settings set in script
Win8, PS CC.
Title: Re: Batch HDR Toning Script for Photoshop
Post by: dmilligan on October 17, 2013, 01:28:14 PM
EXR is not native, I've checked. I can only save files with the options provided to me by Adobe's API, even if photoshop can save in some particular format, or with certain options, it doesn't mean I can do it from a script, b/c adobe may not have implemented that particular format in the API. The only compression options available for TIFF in the API are LZW and ZIP (well, you can also do JPEG, but if you're going to do that, why not just save as JPEG). The JPEG compression scale goes from 1-10 (at least in the API).

@mikmac,
I'd love to help fix you're problem, but I'm going to need more information than that. What exactly is the error you're getting? is it a scripting error, or some kind of general photoshop error? When exactly does it happen? can you send me a screenshot? Does it choke on any 5 bracket sequence or is it only certain files it's not handling?
Title: Re: Batch HDR Toning Script for Photoshop
Post by: mikmac on October 17, 2013, 02:24:43 PM
ehh.. something has broke, i dunno what...
I thought it was 5-pic bracket, but its not, it was just my last bracket to make today... Now I've made some tests and script stopped working at all 3-pic or 5 or 7 bracket.
All the time same error:



I've reload PS, whole computer and even reupload script - nothing. Files that script made already now stucks...

(https://www.magiclantern.fm/forum/proxy.php?request=http%3A%2F%2Fwww.art-d.pl%2F1.jpg&hash=cd5db1660be1455166b8c17a99032529)

Forget above... i have to write *.cr2 to omit thumbs file... shit..during testing i forgot about it.

But still with my 5-bracket panorama i get an error:
(https://www.magiclantern.fm/forum/proxy.php?request=http%3A%2F%2Fwww.art-d.pl%2F2.jpg&hash=fea27562f1b9e7eb35be1f07f070c973)
Dunno why... I've made some other 5-brackets now and it works great, with that one it wont. Every single 5-bracket makes same error from this panorama (13x5brackets).
Title: Re: Batch HDR Toning Script for Photoshop
Post by: RenatoPhoto on October 17, 2013, 05:31:47 PM
I am trying to script.  Have three tif files but get this error:
(https://www.magiclantern.fm/forum/proxy.php?request=http%3A%2F%2Fs20.postimg.org%2Fcfqumy46l%2Ferror2_1000.jpg&hash=be5c4f2c9afb031a8f37edd03c9c3e93)
Title: Re: Batch HDR Toning Script for Photoshop
Post by: dmilligan on October 17, 2013, 10:12:52 PM
Sorry, I left the debugger on. These were just internal exceptions in the adobe scripts b/c I had the debug level set to catch all exceptions (even handled ones in try-catches). It should be fixed now. You can always just press the green arrow to continue ;)

https://github.com/davidmilligan/PhotoshopBatchHDR/commit/1c50faaa1e57e504c549a25a4a145343bf83f36b
Title: Re: Batch HDR Toning Script for Photoshop
Post by: RenatoPhoto on October 17, 2013, 10:44:28 PM
Now it stops at line 108

Error 1302 No such element
line 108
->   if(app.activeDocument != null)
Title: Re: Batch HDR Toning Script for Photoshop
Post by: ERANTZ on January 01, 2014, 12:27:16 AM
dmilligan, receive a big big thanks for that great script! As a 360┬║ panoramic photographer I have to batch convert bracketed stacks to 32bit HDR all the time (7 to 10 HDR stacks per pano) and is a pain in the ass to manually merge each. This script has really eased out things for me and I'm quite happy about it!  8)

Now, I'm a Mac user and I found an issue that may be bothering other users when applying this script and I want to share it with you. Using the script with folders containing plenty of stacks I've been getting this error in PS:

"Error: No such element, Check number of files in source folder"

After dealing a while with it I found that there was a mysterious extra file added to the file list the script generated from the folder which for example indicated 4 images at a directory when having just 3 of them on it or 61 images when the directory just had 60 and that was generating the script error. What I fountd is that the mysterious extra file is the hidden file .DS_Store which OSX auto generates at each folder and is counted each time interfering with the script, the solution to this error is to manually delete this file at the directory (configuring previously the system to show hidden files) or to just deactivate this file auto creation.

After discovering this I'm using the script fluidly without any trouble. Hope this info helps somebody else and thanks again for this marvelous tool!

Luis
Title: Re: Batch HDR Toning Script for Photoshop
Post by: dmilligan on January 01, 2014, 12:39:28 AM
Hint: you can use the filter field, example: *.CR2

Then only cr2 files will be included from the source folder

Windows users may have similar issues with thumbs.db
Title: Re: Batch HDR Toning Script for Photoshop
Post by: engardeknave on January 01, 2014, 08:27:26 AM
Just tried this now but I'm getting:

(https://www.magiclantern.fm/forum/proxy.php?request=http%3A%2F%2Fi.imgur.com%2F4mlLWB1.png&hash=1b33549faf0b15e9e7baad48b96a279d)

(https://www.magiclantern.fm/forum/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FnZt2K0J.png&hash=36ee7238a30ea9e920fe79872ec47d91)

The message isn't referring to a line in the script though because it happens no matter what's on line 182. I'm doing this in in Photoshop CC. It happens no matter what the settings unless I put only one frame per set.

Title: Re: Batch HDR Toning Script for Photoshop
Post by: dmilligan on January 01, 2014, 05:22:11 PM
It's line 182 in one of Adobe's scripts. This script makes calls to various Adobe scripts. Uncomment line 38:
Code: [Select]
//$.level = 2;
and it should break inside those Adobe scripts, so you can see what is actually going on.
Title: Re: Batch HDR Toning Script for Photoshop
Post by: engardeknave on January 02, 2014, 02:38:52 AM
Stops at line 172 "throw Error( kUserCanceledError );" (Didn't cancel.)
Resuming from there, it stops at 385, "app.activeDocument = tmpdoc;" (tempdoc=null)
Title: Re: Batch HDR Toning Script for Photoshop
Post by: dmilligan on January 02, 2014, 04:24:30 AM
Which file is that in? There are several Adobe scripts that get called. The call stack info might be helpful too.

Also, does it work if you merge those source files manually with 'Merge to HDR Pro...'

At the merge stage all I really do is call a function in an Adobe script and send it some filenames, pretty much the only thing my script can screw up is sending the wrong filenames.

If the problem is in an Adobe script there's not much I can do about it (which probably means it can't merge your source images for some reason). If you want to send me a small sample of the files I can try and run it myself.
Title: Re: Batch HDR Toning Script for Photoshop
Post by: engardeknave on January 02, 2014, 07:13:55 AM
Merge to HDR Pro works fine. Thanks for your help, but I don't think I'm going to bother with this though since Photoshop takes forever and I already have this scripted with Photomatix. (I'm also going to continue messing around with Ceronoice (http://www.magiclantern.fm/forum/index.php?topic=9581.25), which you should take a look at for an extremely fast/free solution.)
Title: Re: Batch HDR Toning Script for Photoshop
Post by: dmilligan on January 02, 2014, 03:08:40 PM
I really wrote this script to be able to use the photoshop toning tools not just the HDR merge. It's just that most ppl want to use it more for the merging ability, which does seem a little strange to me.
Title: Re: Batch HDR Toning Script for Photoshop
Post by: kirkt on January 02, 2014, 04:23:02 PM
Thanks for the script - it's a nicely implemented, automated way to consolidate HDR workflow in PS.  Is there a way to use it so that it takes advantage of the PS CC HDR toning workflow that uses the Camera Raw interface?  Like passing it an XML sidecar in place of a HDR toning preset? 

Because that's just what you need - more people asking you for free shit.

Thanks for your efforts!

kirk
Title: Re: Batch HDR Toning Script for Photoshop
Post by: dmilligan on January 02, 2014, 06:06:23 PM
If you want to use ACR for toning, I recommend just running the script, outputting 32bit TIF, then toning the resulting TIFF sequence in Bridge. You'll have a lot more flexibility and it will be faster to do it from Bridge. I even have another script (http://www.magiclantern.fm/forum/index.php?topic=8850.0) for ramping ACR settings so you could take advantage of that as well.

Here's a sequence that I did that with (since I needed to use my Bridge script to deflicker):


Each frame is a 2 shot bracket, with AETTR setting the exposure and the second shot +4EV.

I merged them using my photoshop script to 32 bit TIFF, then I deflickered and toned using my Bridge script.
Title: Re: Batch HDR Toning Script for Photoshop
Post by: engardeknave on January 03, 2014, 12:52:42 AM
It makes sense to use Photoshop to merge if you want the dynamic range of a 32-bit workflow and don't have some other software to do it.

Frankly, I have yet to see any sort of automated toning that doesn't look like the work of a retarded chimpanzee--that I'm not just going to have to correct in an additional step anyway. And of all the software I've tried, Photoshop is dead worst imo.
Title: Re: Batch HDR Toning Script for Photoshop
Post by: webbwbb on March 06, 2014, 06:38:23 PM
I was trying to use this last night and ran into some problems...  I use CS5.  I need to run the deghosting off the properly exposed image.  Photoshop wants to run it off the underexposed image.  I can just change it over on Merge to HDR Pro but I don't really have any options to do that with the batch script.  Am I missing something?  I have some coding experience and have poked around in your batch file and in Adobe's script file but haven't found anything that seemed to handle it.
Title: Re: Batch HDR Toning Script for Photoshop
Post by: dmilligan on March 06, 2014, 10:23:15 PM
in Merge To HDR.jsx (the Adobe script):
Code: [Select]
// Set to the deghosting base image index, or to kMergeToHDRDeghostOff or kMergeToHDRDeghostBest
mergeToHDR.deghostSetting = null;

so in my code you'd need to change line 118:
Code: [Select]
mergeToHDR.mergeFilesToHDR( currentFileList, mergeToHDR.useAlignment, hdrDeghosting ? kMergeToHDRDeghostBest : kMergeToHDRDeghostOff);

I guess when you use kMergeToHDRDeghostBest Photoshop automatically tries to determine the 'best' (whatever that means) image and does the deghost of off that one.
Title: Re: Batch HDR Toning Script for Photoshop
Post by: webbwbb on March 06, 2014, 11:58:46 PM
I played around with that line in the Adobe one just hoping to get it to use the file I wanted but no values seemed to change behavior; no matter what was entered, the functionality stayed the same.  I restarted Photoshop between edits of that file.
Title: Re: Batch HDR Toning Script for Photoshop
Post by: dmilligan on March 07, 2014, 01:03:50 AM
don't mess with the adobe script, change the call to mergeToHDR.mergeFilesToHDR (the third parameter) in my script (the function call is going to overwrite deghostSetting when it runs)
Title: Re: Batch HDR Toning Script for Photoshop
Post by: webbwbb on March 07, 2014, 01:32:26 AM
That worked, thank you!
Title: Re: Batch HDR Toning Script for Photoshop
Post by: concept2form on March 07, 2014, 07:41:24 PM
Just wanted to drop by and let you know that I used your script last night on a very large amount of files, and it went off perfectly!!! That being said, and of all the scripts I've used to automate PS in the past are belittled by the genius of this script. ADOBE SHOULD GIVE YOU SOME MONEY!! If I wasn't so broke, I'd give you money!

Good on ya for this one!!! Saved me countless hours of, selecting brackets, going to tools menu drop-down, selecting command, waiting, saving, repeating....

I hope you end up getting kickbacks for this and that Adobe doesn't undercut you and add this feature to any future releases of PS/Bridge. You deserve it! Thanks again!

If you'd like to build this into a plug-in, I could help you there.
Title: Re: Batch HDR Toning Script for Photoshop
Post by: dmilligan on March 07, 2014, 09:36:07 PM
thanks ;)
Title: Re: Batch HDR Toning Script for Photoshop
Post by: photo360 on March 27, 2014, 08:49:36 AM
Hi,
Thank you very much for your script.
I try to use it on CS6 (64bits or 32bits on windows 7) and i have always the same problem: the image files are not merged in the order of the filename.
If i have a directory with the sequence: file1.jpg, file2.jpg, file3.jpg, file4.jpg, file5.jpg, file6.jpg and try to merge it by a number of brackets = 3, the script merge the files like this (file2.jpg, file6.jpg, file5.jpg) and (file1.jpg, file3.jpg, file4.jpg) wich is not right and souhd be (file1.jpg, file2.jpg, file3.jpg) and (file4.jpg, file5.jpg, file6.jpg).
I should precise one important thing: it works fine if the directory is stored on local drive (for example c:) but it bugs when files are on a distant server (synology DS1010+).

Thanks for your help
Title: Re: Batch HDR Toning Script for Photoshop
Post by: photo360 on March 27, 2014, 09:49:59 AM
Ok. i finaly found a solution.

i have add this line in the code, just under "var files =  sourceFolder.getFiles(fileMask);"
 "files.sort();"

Hope this can help somebody.

Best regards,
Title: Re: Batch HDR Toning Script for Photoshop
Post by: dmilligan on March 27, 2014, 11:42:18 AM
thanks, I'll add it to the script
Title: Re: Batch HDR Toning Script for Photoshop
Post by: kanoneno on April 15, 2014, 10:07:38 PM
Hi there,

I'm trying to batch process a set of HDR files and I got into this thread.

I tried to use the BatchHDR Script but I get an error, does anybody know what can I do to fix this?

Error 60: Not well-formed (invalid token)
Line 1296

I would really appreciate If I could use this script, it will save tons of time
Title: Re: Batch HDR Toning Script for Photoshop
Post by: dmilligan on April 15, 2014, 11:06:42 PM
I can only assume that the error is occurring in one of the built-in adobe scripts, as this script doesn't have 1296 lines.

I can't help you unless you can give me more information about the error. When exactly does it occur? What version of Photoshop? Mac/Win? What are your settings? Can you successfully manually merge a set of the images?
Title: Re: Batch HDR Toning Script for Photoshop
Post by: kanoneno on April 16, 2014, 07:12:00 AM
Thanks for replying,

I'm working on Photoshop CC 64bit on a windows computer, the issue goes like this:

When I open Photoshop I go into the scripts menu, thats where the program recognizes the Batch HDR script, for some reason it doesn't place it under the Automate submenu, and when I try to run the script the error code appears.

I'm trying to attach a image of the error but can't find an attachment button that works




Title: Re: Batch HDR Toning Script for Photoshop
Post by: dmilligan on April 16, 2014, 03:03:53 PM
It sounds like the script is probably failing trying to load the built in Adobe scripts. Could be something to do with windows 8 or 64 bit directory paths weirdness.  I don't have a windows pc, so I can't really help you much, other than to guide you on how to fix the problem yourself. You can download the ExtendScript Toolkit from Adobe and try stepping through the script in debug mode. You'll want to uncomment line 38. Click on the line numbers on the left side to set a breakpoint on a particular line (the script will pause there until you hit the continue button). If the script fails you should be able to see exactly where it failed (in what file), it should automatically pause and highlight the line orange. The stacktrace (middle right side of window) will tell you where in my script it is currently executing, if it has failed in a different file.

If that is too technical for you then you could try asking in the Adobe photoshop scripting forum. Someone there with a windows box might be able to determine what is going on with the script. Or I can ask over there if you'd like.

I'm trying to attach a image of the error but can't find an attachment button that works
There is no way to do attachments, you have to upload the image to some public file sharing like dropbox, imgur, etc. and put the link in an img tag
Title: Re: Batch HDR Toning Script for Photoshop
Post by: efex83 on May 01, 2014, 12:44:56 PM
thanks for this great piece of code.

im having a problem using the preview function, when i try to open files the dropdown menu for the filetype says
"FUNCTION (){RETURN TRUE;} (function (){return true;})"

unsurprisingly there are no files of this filetype, so i cant pick any

Win7 64; CS6 64

grateful for any pointers
Title: Re: Batch HDR Toning Script for Photoshop
Post by: dmilligan on May 01, 2014, 10:40:58 PM
Not sure how that happened but I guess I never noticed as I'm on a mac and it seems the filer argument is ignored. It should be fixed now, but I have no way to test it.
Title: Re: Batch HDR Toning Script for Photoshop
Post by: tibungla on May 15, 2014, 12:37:43 AM
First let me say thanks! Thanks for writing this, sharing it, and helping those of us who don't know how to code.

I love the script and want to make 2 tweaks to it.

1. I want to Deghost using the underexposed image. How can I set that instead of the "Best" image?
2. I want to set the  White Point Preview to the darkest option possible, all the way to the right on the slider in the HDR dialog box. Is there a way to set this?

Thanks in advance!
Title: Re: Batch HDR Toning Script for Photoshop
Post by: dmilligan on May 15, 2014, 02:33:56 AM
1. Replace 'kMergeToHDRDeghostBest' as per reply #35 of this thread, with a number, that number would be the index of the image you want to be the deghost image. (see the next reply)

2. The white point preview is just a preview, and you never see the dialog when the script runs
Title: Re: Batch HDR Toning Script for Photoshop
Post by: dmilligan on May 15, 2014, 11:48:04 PM
okay, so since several ppl wanted it and I had some time and I went ahead and made the deghost option a drop down, you can pick "Best", "Off", or the index of an image (it's 0-based I think, so this is how I coded it). I have not tested this, so please check it and let me know if works correctly.
Title: Re: Batch HDR Toning Script for Photoshop
Post by: tibungla on May 16, 2014, 10:17:51 PM
You are the man! Thanks for continuing to develop this!

I'm experiencing one glitch, but otherwise it works great! Here's what's happening:

Sometimes when I select a folder of images and launch the script PS comes up with a dialog something like: "Merging files 1-3 of 19" when I only have 18 images in the folder. When this happens the script fails. My work around is to create a new folder, select the images and move them. Then run the script again. This seems to work consistently.

I'm running this in OS 10.9.2 on a 13" MacBook Pro.
Title: Re: Batch HDR Toning Script for Photoshop
Post by: dmilligan on May 16, 2014, 10:56:29 PM
Did you try using the 'File Filter' box? This is what it is for. Many times the OS creates hidden temp files in folders, that is probably what is happening. Example usage: *.cr2
Title: Re: Batch HDR Toning Script for Photoshop
Post by: Pablito on July 01, 2014, 12:30:05 PM
I have been trying to Batch HDR some RAW HDR video converted with raw2cdng but the script doesn't work on DNG's.
Using DNG's in Photoshop CC on Windows 7, I get:- "Error: No such element, Check number of files in source folder". 
But it works fine using CR2's.
It is beyond my skills but I'm wondering if this can be modified to work on DNG's.
The Merge to HDR script works on DNG's so wouldn't it be possible to get the Batch HDR script to work on DNG's?
Title: Re: Batch HDR Toning Script for Photoshop
Post by: dmilligan on July 01, 2014, 12:51:49 PM
it should work just fine with DNGs, see the reply directly above yours
Title: Re: Batch HDR Toning Script for Photoshop
Post by: Pablito on July 01, 2014, 01:10:46 PM
Thanks for replying Dave.
It's encouraging to know it does work with DNG's as this will make a great workflow with high quality output.
I've been using the filter, (*.dng) but without success.
I was using CS6 and upgraded to PS CC but still no luck.

Using Merge to HDR Pro on a couple of dng's with ISO 100 & 1600 creates great looking HDR tiffs.
I would love to batch it for video.
Title: Re: Batch HDR Toning Script for Photoshop
Post by: dmilligan on July 01, 2014, 03:13:09 PM
I can't really diagnose what's going on without more info. Perhaps post a screen shot of your source folder and the script dialog. Describe exactly when you get the error. Are you able to run the script successfully with other file types or is it just DNGs that fail?
Title: Re: Batch HDR Toning Script for Photoshop
Post by: Pablito on July 07, 2014, 05:53:08 AM
When I select the source folder of DNG's and output, add file filter *.dng and press OK and run the script, I get the error; "No such element, Check the number of files in source folder".
It seems to work ok with .CR2's, just not .dng's for me.

https://drive.google.com/file/d/0ByCkZ_iRaK0_OXd5TGNGa0Jxb1k/edit?usp=sharing (https://drive.google.com/file/d/0ByCkZ_iRaK0_OXd5TGNGa0Jxb1k/edit?usp=sharing)
https://drive.google.com/file/d/0ByCkZ_iRaK0_VFNQb2tzOVdJdDQ/edit?usp=sharing (https://drive.google.com/file/d/0ByCkZ_iRaK0_VFNQb2tzOVdJdDQ/edit?usp=sharing)
https://drive.google.com/file/d/0ByCkZ_iRaK0_b2JNeUM3TERVeFk/edit?usp=sharing (https://drive.google.com/file/d/0ByCkZ_iRaK0_b2JNeUM3TERVeFk/edit?usp=sharing)
https://drive.google.com/file/d/0ByCkZ_iRaK0_MkNpckJjRHVNcVk/edit?usp=sharing (https://drive.google.com/file/d/0ByCkZ_iRaK0_MkNpckJjRHVNcVk/edit?usp=sharing)
Title: Re: Batch HDR Toning Script for Photoshop
Post by: dmilligan on July 07, 2014, 11:50:41 PM
ok, it seems like you've got everything setup correctly, it should work, would you mind uploading a couple sample DNGs, so I can debug it on my computer?
Title: Re: Batch HDR Toning Script for Photoshop
Post by: Pablito on July 08, 2014, 02:54:30 AM
Thanks David.
2 dng's attached.

https://drive.google.com/file/d/0ByCkZ_iRaK0_RmxaMVdsbWFMdkU/edit?usp=sharing (https://drive.google.com/file/d/0ByCkZ_iRaK0_RmxaMVdsbWFMdkU/edit?usp=sharing)
https://drive.google.com/file/d/0ByCkZ_iRaK0_UUpHWU1mMUhoUGM/edit?usp=sharing (https://drive.google.com/file/d/0ByCkZ_iRaK0_UUpHWU1mMUhoUGM/edit?usp=sharing)
Title: Re: Batch HDR Toning Script for Photoshop
Post by: dmilligan on July 09, 2014, 02:48:59 AM
Ok, I think I've finally figured it out, the DNGs fail to merge because they are missing exif metadata, so the photoshop merge script doesn't know what the EV values are. When I try to merge them manually I get a popup asking me to manually enter exposure data. The script runs in non-interactive mode (for obvious reasons), so instead of asking for this data, it simply fails.

So, to use the script you're going to have to have DNGs that have exposure metadata or it's just not going to work.
Title: Re: Batch HDR Toning Script for Photoshop
Post by: Pablito on July 09, 2014, 05:45:30 AM
Thanks so much David.
raw2cdng obviously doesn't preserve exif data.
I'll try Abobe dngconverter.
Damn. Adobe didn't work.
Title: Re: Batch HDR Toning Script for Photoshop
Post by: dmilligan on July 09, 2014, 03:41:33 PM
Are you recording with mlv_rec? Only mlv actually records the needed metadata to be put in the DNGs, raw_rec does not store any exposure metadata (converters like raw2cdng don't add this metadata b/c they can't, they don't know what it is b/c its not even recorded in the original raw file)

Alternatively, you can probably add the metadata manually with exiftool (http://www.sno.phy.queensu.ca/~phil/exiftool/)
Title: Re: Batch HDR Toning Script for Photoshop
Post by: garry23 on July 09, 2014, 04:20:01 PM
Related to the above, I successfully batch add EXIF data to timelapse silent DNGs with EXIFToolGUI.

I find the GUI version of EXIFTool more accessible to simpletons like me :-o).

No command line 'stuff' to worry about.
Title: Re: Batch HDR Toning Script for Photoshop
Post by: Pablito on July 18, 2014, 12:00:31 AM
Thanks David.
Once I read your post I realised without using MLV RAW I wouldn't get exif data and couldn't use the HDR Batch script.
I have yet to try an MLV HDR video Batched but will report back once I have.
And will try the Exif tool on some RAW footage.
Thanks again.
Title: Re: Batch HDR Toning Script for Photoshop
Post by: dvdr on January 04, 2016, 01:23:56 AM
Hi

stumbled over your script - just what I need to prepare my bracketed exposures for a gigapixel panorama....
But unfortunately, I am getting this error:

Code: [Select]
Fehler 60: Nicht wohlgeformt (ung├╝ltiger Token).  (trying to translate it: "error 60: not properly formed/ well formed - invalid token", whatever that means)
Linie: 719
->          <td id="LC74" class="blob-code blob-code-inner js-file-line">{</td>

This is happening in both Photoshop CS6 and in CC2015 on my Mac, running El Capitan.

Hope, you can help me getting this to work... Thanks in advance!
Title: Re: Batch HDR Toning Script for Photoshop
Post by: dmilligan on January 04, 2016, 02:38:04 AM
Looks like you downloaded and are trying to run the webpage the script is on rather than the script itself.
Title: Re: Batch HDR Toning Script for Photoshop
Post by: dmilligan on January 04, 2016, 02:38:36 AM
Looks like you downloaded and are trying to run the webpage the script is on rather than the script itself.
Title: Re: Batch HDR Toning Script for Photoshop
Post by: dvdr on January 05, 2016, 02:28:18 PM
Yes, you were right - it's a bit tricky to download the script with a MAC - now I managed (I had downloaded the html from you provided link when choosing "save target").

May I ask another question, that came up, when I was using the script?
I chose not to use your preview function to create the proper development settings, but chose to create a development preset in Photoshop (CC) itself, so I could get back to it some other time.
Here's, what I encountered:
- I could not access that preset from using "browse" in your script, since it is stored in a application support/Adobe-subfolder under "Library" (I have found no way to access that hidden folder from that browse-window, so I accessed it via the finder (revealing the hidden library-folder) and copied the preset to some other,accessable  location)
- when loading that very preset, the sliders in your script's window did not reflect the chosen settings in the preset, only slider, that was changing, was the vibrance slider, which mounted to a value of around 45000
- also, the toning curve was not loaded from the preset. Default is 0,0,255,255, and it was 0, 38, 120,150 - should have been something like 0,0,14,14,45,50,.....255,255  to reflect the changes I made in the preset-file I created in photoshop. So I wrote down the values from photoshop and manually entered them in the bottom line where the toning curve values are.
- even, when storing the preset-file in the same directory, where the other presets of Photoshop are (so that it appears in the dropdown list in your script), the abovementioned problems appear

I hope, that I did not completely misunderstand the way, your script works and am asking stupid questions...
Thanks again for helping and providing the script!
Title: Re: Batch HDR Toning Script for Photoshop
Post by: dmilligan on January 05, 2016, 02:57:55 PM
Adobe may have changed the preset file format. It's just some simple, proprietary, undocumented format, so I just reversed engineered it, but that was a long time ago (CS6 I think) and it could have changed since then.
Title: Tips to Get Files to Import?
Post by: benwstevens on July 13, 2016, 05:26:58 AM
This thing is A-M-A-Z-I-N-G.

I just can't get it to load any file (jpg, raw, etc) from the input menu. They'll load in the preview window but not in the input window, so I can't use it.

Here's a screenshot: https://www.dropbox.com/s/0pb0z9fstyy1szu/Screen%20Shot%202016-07-12%20at%2010.23.00%20PM.png?dl=0

A much less important issue is that I get an "error loading file" message when I try to load my .xmp ACR preset file.

Screenshot: https://www.dropbox.com/s/c1a0gnpuov9a2wi/Screen%20Shot%202016-07-12%20at%2010.23.59%20PM.png?dl=0

Any ideas on getting it to import the pictures? I have to photograph 250 apartments in HDR and would loooooove to use your script for it.
Title: Re: Batch HDR Toning Script for Photoshop
Post by: benwstevens on July 14, 2016, 03:56:55 PM
I'm such a goof. I thought it said choose input files. It said folder. Got that part figured out. Sorry for wasting your time!



Post approved after following reply.  // Audionut

Title: Re: Batch HDR Toning Script for Photoshop
Post by: dmilligan on July 14, 2016, 10:13:47 PM
You select a folder, not files. It will batch all files in the folder. See instructions linked in OP: https://github.com/davidmilligan/PhotoshopBatchHDR/wiki

You can't load xmp files as presets. You must load an HDR toning preset file (this might not even work any more).