Aperture HDR presets?

I could have titled this a number of ways

I could have titled this a number of ways: "Where is Aperture 4?"; "Will Adobe force LR into the cloud as well?"; but when it comes down to it this is kind of what I want to know - does anyone have / know of any good presets for Aperture that recreate the HDR look without doing HDR? I've got the Nik plug-ins so I can do real HDR whenever I want, but sometimes I just want to add some oomph to a photo and I've found in LR4 that it can be done with some presets - in particular some I got from Trey Ratcliffe (the HDR king) who sometimes just tweaks a photos with his HDR-like presets in LR4.
I've looked on the web but apart from www.aperture-presets.org which costs a whopping $35 for a set of 10 presets I can't see any that might do the business. So, can anyone enlighten me please? Am I being slow, web-blind or is it one of the limitations of Aperture 3 that it can't recreate what LR4 can do in it's develop module?
Thanks all, James

Similar Messages

  • Aperture & HDR & Photostitching

    Hi
    I use Aperture, and am quite keen to get into HDR & stitching photo's for Panoramic shots. I know that there is the Hydra plug-in for Aperture, I have downloaded the trial version, its not bad but seems basic.
    I have read about PTGui & Autopano Pro and was wondering if anyone already using these applications, or any other dedicated software would care to comment on what they are like, or any other brand for that matter...
    Also do the above applications interact with Aperture, and is it possible to edit with them, from within Aperture.
    Any comments would be appreciated and helpful...
    Thanks..... W

    I'm currently using Autopan Pro, and Photoshop for creating pans. I find them both to be excellent, with a slight edge to Photoshop for alignment and ghosting. I also use Photomatix Pro and Photoshop for HDR. My experiments give Photoshop an edge once again for alignment and ghosting, but control of the HDR image is almost non-existent. Also, tonemapping is a manual process, and I'm not smart enough to deal with it. Therefore, unless there are major problems with movement during bracketing, I use Photomatix Pro most of the time. If I create the HDR with Photoshop, I save it as an open exr file and tonemap in Photomatix Pro. There is an excellent tutorial on HDR at http://stuckincustoms.com/2006/06/06/548/. Take a look, the author uses multiple applications in the creation of his final picture example.
    I am currently researching how well Aperture fits in the HDR workflow since it seems to pack all image files into its own filesystem or library where the individual files lose their identity and accessibility through the Mac filesystem. I don't know this to necessarily be true, but right now I believe it to be. If so, I believe it rules-out Aperture for me. There are many things I like about it, but I need to be able to easily bounce image files around to many different applications and the Aperture interface/filesystem seems to make the task too cumbersome. Also, from reading this forum I believe that when you import RAW files into Aperture they are automatically manipulated. Something I need to understand more about also.
    I hope this helps.
    Hal

  • Aperture 3 preset

    I have a problem with adjustment preset, I have a contrast preset using curve adjustment, when ever I apply this preset it's always change the existing curve preset.
    Is there any other way to prevent the preset changing the existing curve adjustment. I would like that preset create a new a curve adjustment.
    Thank u

    Welcome to the forum
    Unless you have more than one curve adjustment in your preset, only one curve adjustment will be applied, and it will be applied to the existing curve adjustment.
    You could have an auto-curve adjustment along with some other curve adjustment in your preset.
    DLS

  • Presets - Aperture vs. Photoshop

    Is there an Aperture user out there who is also a heavy user of presets in Photoshop? I've never really used them in Photoshop, personally. I know Aperture's presets are limited to individual adjustments, whereas I think you can set up groups of adjustments in Photoshop (is this a correct assumption?). I'm not really catching how presets are that helpful. If I take 1,000 photos one afternoon in a new environment, don't I have to create new presets in photoshop to get sharpness, white balance, boost, shadow, etc. right? How are presets more helpful than Lift and Stamp then? Is the time saving you get from using presets in Photoshop/Bridge significant versus Lift and Stamp? Is there a better workaround? From a workflow perspective, could you just run your "picks" through Photoshop all the selecting and light editing?
    Any thoughts would be appreciated.

    Hi Steven,
    I used to be a heavier CS2 user than I am now, but I'd say I was more fly-weight than heavyweight. But here's my take.
    In CS2, many adjustments and filters allow you to save or load the settings for future use ... presets if you would. I didn't find them as useful on an ad hoc basis, but when used in conjunction with CS2 actions (scripts) they can be run across a whole group of images in a batch mode.
    I would say there are strong similarities. CS2 Actions are more powerful I suggest as they allow for a chaining of several presets on both adjustments and filters and which have overlapping/stacking effects (possible by virtue of layers of course and to a degree masks). That is, an action is a sequence of steps: step 1, step 2, .... step n. Each step performs an adjustment, filter, setting with parameters or recalled saved settings.
    Saved settings (presets) allow for a profile to be pulled into such an action, and esp. if you want to create 2 or 3 actions (same set of processes), but with different adjustment effects (presets) used during any one action.
    Aperture is far more hands on, and since it isn't a compositing tool, the sequencing aspect of the Action (like a saved Lift and Stamp set) has less value ... but still some. I see value in having far more batch support so I can enjoy longer coffee breaks, esp. for my post-import adjustments. Ex. Action from the Terminal or Automator level to import this folder of images, apply this RAW preset, auto-level with this preset, do this WB preset, then do a noise with this preset and an edge sharpen of that preset. That means saving my Lift/Stamp so I can call from Automator .... but I don't believe I can do that, nor make my selection of images outside of Aperture to apply the Lift/Stamp to.
    G.

  • Aperture 3.1 available now!

    It would appear that more than a few issues have been resolved in the latest update!
    See http://support.apple.com/kb/TS2518 for the full release notes.
    Aperture 3.1 Release Notes
    This update improves overall stability and performance, and addresses compatibility with iLife '11. It also includes a number of specific fixes in the following areas:
    Library
    Improves performance when opening large libraries.
    Fixes an issue that could prevent thumbnails from being properly rendered when reprocessing masters.
    Addresses reliability and performance issues when running Repair Database and Rebuild Database operations in Aperture Library First Aid.
    Improves reliability of upgrading libraries with images containing Spot & Patch adjustments.
    Improves accuracy of the progress bars displayed when updating Vaults.
    Adjustments
    Addresses performance issues when exporting heavily-adjusted images, particularly those with Highlights & Shadows, Definition, Noise Reduction, Edge Sharpen, Sharpen, Skin Smoothing, or Blur.
    Addresses performance when using Core Image filters such as Curves, Levels, and Highlights & Shadows.
    Eliminates black “halos” that could appear in areas of extreme luminance in scaled images in the Viewer.
    Addresses quality issues with Red Eye correction.
    Fixes an issue in the Adjustment Presets editor that could cause the names of adjustments within a preset to temporarily appear blank.
    Addresses performance issues with using the Straighten tool on adjusted images.
    Straighten grid now appears correctly after applying and resetting a crop.
    Fixes issues that could cause Aperture to stop responding or quit unexpectedly when processing an image with Sharpen applied.
    Addresses an issue that could reduce image quality on straightened photos.
    Fixes an issue that could prevent data from being properly entered into numeric fields in the Adjustments HUD.
    Addresses an issue that sometimes prevented the correct cursor from appearing after choosing a Quick Brush
    Fixes a problem that caused the Master Aspect Ratio setting to fail if used in combination with the "create new versions when making adjustments" preference.
    Fixes an issue that could cause Aperture to stop responding when making adjustments to images in a stack if the “create new versions when making adjustments” option was chosen.
    Thumbnails and previews now display correctly for images that are flipped and rotated.
    When reprocessing masters, Aperture now displays a progress bar with a count indicating the number of images remaining to be processed.
    Addresses performances issues when zooming images to 100%.
    Faces
    Fixes an issue that could cause some file tiles to be rotated incorrectly.
    Addresses performance issues when loading thumbnails in Faces view.
    Improves reliability of face detection and naming when working with RAW+JPEG pairs.
    Addresses an issue that could result in “blank” face thumbnails in Faces view.
    When in Confirm Faces mode, the contextual menu now correctly includes the “Not a face” option.
    The Confirm Faces mode can now be updated and refreshed by holding down the Option key while clicking the Done button.
    Dragging multiple snapshots on the Faces corkboard now correctly moves all the selected snapshots.
    The “include face info in exported photos” option now exports Face names as keywords when exporting masters, writing IPTC to masters, or exporting metadata.
    Printing
    Fixes an issue that caused the wrong color profile to be used when previewing an image using the Loupe in the Print dialog.
    Addresses an issue that could cause a thin black line to appear on the top edge of some prints.
    Slideshows
    Addresses an issue that could cause photo effects applied to images in slideshows to persist even after being removed.
    When exporting a slideshow, the Custom option now includes a Quality pop-up menu in order to control compression quality/size of resulting H.264 or MPEG-4 files.
    Fixes a problem that could cause the audio browser to display improperly when creating a slideshow.
    Slideshows can now be exported using presets for compatibility with Apple TV and iPad.
    Fixes an issue that could produce incorrect results when the start and end positions of a Ken Burns setting were swapped in the slideshow editor.
    Adding an inset to a photo in a Classic and Ken Burns slideshow no longer changes the width of a border applied to the same photo.
    Choosing "Fit Selected Slides to Main Audio Track" no longer unnecessarily reduces the length of video clips contained within the slideshow.
    Deselecting the custom duration set for a select slide by deselecting the “Play slide for” checkbox now correctly returns the slide’s duration to its default value.
    Places
    Fixes an issue that could produce inaccurate results when assigning photos to a GPS track path.
    Metadata Inspector can now display GPS Direction if this data is available in geotagged photos.
    Addresses an issue that could prevent imported track paths from appearing in the Tracks & Waypoints menu after restarting the application.
    Metadata
    The Keyword HUD now displays a count for the number of times each keyword has been used in a library.
    Fixes an issue that could cause duplicate keywords to appear after merging a library.
    Fixes an issue that could prevent photos with an IPTC Subject Code to export correctly when exporting masters with the “Create IPTC4XMP Sidecar File" option enabled.
    Fixes an issue that caused Longitude data to export incorrectly when using the Export > Metadata command.
    The Date Created field in IPTC Core can now be activated and set by simply clicking in the field.
    Auto-complete of contact info in IPTC Contact fields can now be enabled or disabled in Preferences.
    Metadata Inspector now includes a Sharing view which logs when each photo is published to MobileMe, Facebook, or Flickr.
    General
    The application now displays a progress dialog when opening or switching between libraries.
    Fixes an issue that disabled browser scrolling when in Split View with sort and filter controls hidden.
    Addresses quality issues in connection with rendering of images scaled to below 100% in the Viewer.
    Fixes an issue that could cause the "Loading" indicator in the Viewer to disappear before images were actually loaded.
    Activity window can now be opened by pressing Command-Shift-0 (zero).
    Photos displayed in the iLife Media Browser on Mac OS X v10.6.x Snow Leopard now retain their sort order from Aperture.
    Photos synced to iPod, iPhone, iPad and Apple TV are now sorted in date order by default.
    Search
    Addresses issues to improve performance when searching libraries containing a large number of keywords.
    File Type query now correctly supports search for RAW+JPEG.
    Import
    Fixes an issue that could prevent all photos and videos from loading in the Import window when importing from iPhone or iPad.
    Duplicate detection now correctly works with imported audio and video files.
    Images in BMP format can now be imported.
    Aperture now correctly rotates square images cropped in-camera from Olympus E-P1 and E-P2 models when imported.
    Tethering
    Images captured during a tethered session no longer appear in the Import window, unless they are actually stored on the camera's memory card.
    Fixes an issue that caused a "Missing" badge to temporarily appear on some images imported via tethering.
    Addresses an issue that disabled tethered capture via FireWire on Snow Leopard.
    iPhoto Import
    Images from an iPhoto library that are imported as referenced files can now be correctly accessed and relinked using the Locate Referenced Files command.
    Smart Albums created using Faces in an iPhoto 8 library are now correctly displayed when imported into Aperture.
    Portrait-oriented photos contained in an iPhoto 8 library are now correctly rotated when the library is imported into Aperture.
    Photos marked as “hidden” in an iPhoto 8 library are now imported with a “rejected” tag when the library is imported into Aperture.
    Export
    Fixes an issue that could cause images exported as TIFFs to have an incorrect dpi setting.
    Addresses issues that could slow performance when exporting a large number of projects as a new library.
    Fixes an issue that could cause the "Consolidate masters into exported library" option to not complete when exporting projects to a new library.
    Exported libraries now correctly include all pre-defined Library Smart Albums such as “★ ★ ★ ★ ★” and “★ or better.”
    Web sharing
    Improves memory management when publishing to MobileMe.
    Supports multiple MobileMe, Facebook, and Flickr accounts for compatibility with iLife ’11.
    Enables publishing to Facebook Wall and Flickr Photostream.
    MobileMe, Facebook, and Flickr accounts can now be individually enabled or disabled in each Aperture Library.
    Photos downloaded from MobileMe albums are now copied when imported into Aperture projects.
    Video
    When Aperture attempts to open an unsupported video format, it now correctly prompts you to open the file using QuickTime via Finder.
    Fixes an issue that could cause videos to flicker when multiple videos were selected in the Viewer.
    Books
    Improves scaling of images when photos placed in book layouts have an effective resolution of 110 dpi or less.
    Plug-ins
    Addresses an issue that could cause export plug-ins to use the wrong Aperture export preset when exporting files.

    Oh, baby! This bad boy flies!! Here's what to expect:
    I had 40,000 images in Aperture 3 and it was dog slow at everything. I installed 3.1 update today. It took 5 minutes to update the database and then behaved marginally better than before at ASIC library navigation. I was disappointed.
    Then I QUIT the app. It took a couple of hours to "update files for sharing" with a counter that went to 110,000 images. So it must have updated every thumbnail and variation of preview. Turned it back on , and BAM. Came up fully in seconds. Paused for 10 seconds ten everything was lickrty split. For the first time ever, I can use the Projects view with all 791 projects and scroll quickly. I even put it in photos modevand whipped thru all 49,000 images!
    Haven't done anybprocessing yet, but i'm liking it!!
    Jim

  • Aperture + Adobe Bridge: does that increase amount of storage per image?

    I recently installed Aperture after using Photoshop CS3 and Bridge for some years. When I import images into Aperture that have already been downloaded into Bridge, does that increase the amount of storage space I'm using and if so by how much? I am saving all files to the same folders but what about the various versions created. How much storage are they taking up. My iMac 24 w. 320 Gig is almost full so storage is important.
    Also, if I start using Aperture 3 to download from my camera, do I need Bridge? Any danger in getting rid of Bridge?
    Thanks,
    Cliff

    Cliff,
    The first question is whether you want to run a Managed or Referenced library. The difference is that Managed copies and stores the images inside the Aperture Library package, where a Referenced library locates the master images in Finder somewhere.
    The import procedure is done in both cases, but you use the 'Store Files' drop-down to tell Aperture where to store the master image files.
    With Bridge, you were probably using 'Photo Downloader' to import the files to a selected folder, name the files using some options for format and counting, and perhaps adding basic or predefined metadata on import. This results in a Finder folder structure of your choosing (as well as file names).
    With Aperture, you can do the same thing by selecting 'Choose' under the 'Store Files' drop-down (where you choose or create a new folder). Once you select a location, two other options become available; (1) to move or copy the files and, (2) to pick a sub-folder preset - or choose 'Edit' at bottom of list to design your own folder preset.
    Once you have your location and folder settings selected, you can then use the 'Import Settings' drop-down to select 'Rename Files' option. This gives you a 'Version Name' drop-down in the pane which you can again select a preset or use the 'Edit' at bottom to design your own.
    The items I listed would allow you to keep working like you have been with Bridge to import your images. If your current folder structure can be replicated in the Folder Naming preset dialog, then you could easily continue as you were with Aperture.
    If you want to run the Managed Library, then importing your folders is possible, but you will need to decide how you want to organize the library structure when compared to your current hierarchy.
    The thing to remember about Aperture is that 'Projects' are the only part that actually contain images (whether masters inside or references to masters outside). So, for example; you could use a 'Blue Folder' named 'Year 2010' and then have a 'Project' for each month under the Blue Folder. You could then make an 'Album' for day inside a month Project.
    The result of the aforementioned structure would be a top level folder which then contains projects for each month (where each project is divided up using Albums). Because Projects are the only thing holding images, the albums use aliases for the various images inside that project. Clicking on a days' album would show just the images of that day, where clicking on the Project name would show all images for that month. The blue folder is just an organization tool to help control the clutter.
    Before mentioning my workflow or suggesting another, I would like to compare Bridge/ACR/PS to Aperture work flow.
    With Bridge, you import and organize images in a folder structure, then add metadata (keywords, personal info, etc.) You can also create collections and smart collections for quick references (which are generated by Bridge when asked, which can be a bit slow with smart collections). You then use ACR plug-in to make 'non-destructive' parameter decisions before sending to Photoshop for rendering and more specific edits and output.
    With Aperture, you import into the library (where most of the processing is done on the front end for previews and database storage). You are then in a one-stop workshop where you just use the Inspector pane and toolbars to add metadata, create albums and smart albums, and add adjustments to the versions. At this point, you are set to decide on any output (using the print, image export or web/book album features).
    In essence, and IMHO, you are changing from three separate programs to one program with three Inspector panes.
    Workflow:
    I use a managed library because I have the disc space. I also like the fact that I can copy the library package once a month (at least) to an external drive and have a full working backup which can be run from that drive or copied onto a new drive and double-clicked to load it. The downside to this approach is space. I typically shoot RAW + JPEG and import just the JPEG's to start > decide on the keepers and reject the rest > import the matching RAW's to the project. I use JPEG as Master, because they are all that is needed in many cases. I can switch to the RAW version at any time if I want something more than the JPEG can provide.
    My first suggestion to you would be to create a new empty library as follows:
    1 - Launch Aperture while pressing the 'Option' (Alt) key
    2 - Select 'Create New' button
    3 - Select a location and name the library with a unique name
    This will allow you to import say a few folders (make sure to copy images, not move) and test out how you want to organize the library. You can always delete the library and start over. Look in to the File Naming and Folder Naming items under 'Aperture menu > Presets' to get a feel for the options you have and perhaps create a custom preset or two. These become options in the 'Rename Files> Version Name' and 'Store Files > Subfolder' drop-downs in the Import Pane.
    Here are a few links from the online User Manual that might help clarify:
    *Import folders of images*:
    http://documentation.apple.com/en/aperture/usermanual/#chapter=4%26section=9
    Pay special note to the statement under step #5: *"The top-level folder is converted to a project. If the folder you imported contains a hierarchy of subfolders and images, the subfolders appear as albums."*
    That may address your importing of current image folders (or will give you a good test scenario for the empty library).
    *Planning import strategy*:
    http://documentation.apple.com/en/aperture/usermanual/#chapter=4%26section=3
    *General importing files on computer*:
    http://documentation.apple.com/en/aperture/usermanual/#chapter=4%26section=5
    *Working with Referenced Images*:
    http://documentation.apple.com/en/aperture/usermanual/#chapter=5%26section=16%26 hash=apple_ref:doc:uid:Aperture-UserManual-91292BSR-1037525
    This last link should give you an overview of the options for working with and troubleshooting a referenced image scheme.
    Okay, that should be enough for you to think about for a few. Feel free to ask more as needed. There are many here who know a lot more than I.

  • Batch HDR Merging/Toning Script

    I've seen a number of different posts on these forums about trying to do this and I never really found a complete and suitable solution. It also has really annoyed me that adobe never implemented this (and it's not possible to do with actions because the action just runs a script and you can't record the HDR toning settings, the dialog always pops up, its in the script). So I finally had some time to get my hands dirty with ExtendScript and I have created a fully featured script complete with UI that allows batch creation of HDR tonned images in photoshop.
    The code I got working from various snipets of code I found around the 'net and single stepping through the MergeToHDR.jsx script that is built into photoshop.
    This has only been partially tested on photoshop CC on a mac. Hopefully I made it portable enough and it will work on windows and older versions. I don't think the MergeToHDR script has changed much in the last several versions (and that is mainly what I call to do the work) so I think it should work. If you have issues please let me know.
    My motivation for this script was coming up with a way to do batch HDR toning for timelapse and so this script's features lean toward using it for that end. I really didn't want to buy another separate program for doing this like photomatix, when I knew it should at least be possible to do in photoshop.
    I uploaded the script to github:
    https://github.com/davidmilligan/PhotoshopBatchHDR/blob/master/Batch%20HDR.jsx
    How to use:
    Drop the script in the '[photoshop folder]/presets/scripts' folder and restart photoshop if it is already running.
    The script should appear as a menu item under File>Automate>Batch HDR...
    A dialog will appear where you specify all the settings for the batch
    Input Section:
    Click browse and select the source folder that contains the images to be merged/toned
    Specify "Number of Brackets" this is how many separate images to group into a single HDR output image (the script will group the images in the source folder in order based on this parameter). You can use a value of 1, which means each image in the source folder is separate and will be toned and output. (I find that many times when shooting RAW, 14 bits is ample to capture the full dynamic of the scene, so I do not waste storage space and shutter acutations using more than one exposure, just make sure to ETTR, also post-processing with this script will be faster)
    If there are other files in your source folder (for example .xmp files) that you need to exclude you can specify a filte. For example: *.cr2
    Typically for timelapse you are using a tripod and do not need to have photoshop align the images, but I provided that capability for anyone who might need it b/c it was easy to enable. Note that enabling this will make the process MUCH slower.
    Toning Section:
    These settings are all the same as the photoshop HDR toning dialog for "Local Adaptation"
    To preview what your toning settings will look like you can select any file(s) in your sequence by clicking "Select File(s)..." under "Preview". The file(s) you select will open and merge (if more than one file). When that's finished you can click the "Update Preview" button to apply the current toning settings and see what they will look like (I can't do the fast, automatic previews like the builtin dialog, sorry - somebody from adobe want to show me how to do this?)
    You can see what the settings will look like at another point in your sequence by clicking the "Select File(s).." button again. (I recommend previewing a shot near the beginning, middle, and end of your sequence)
    The dialog prevents you from using anything in photoshop while its open so I provided a zoom to allow you to zoom in on the preview
    The tone curve you must enter as a comma separated list of points (sorry, ScriptUI is not really adequate to create the graphical histogram overlay for the curves like in the builtin dialog). The points are grouped into x,y pairs so for example: x1,y1,x2,y2,etc. Typically you will start with 0,0 and end with 255,255 (note that 255 is the max, full white). Like the curves tool, x represents the input and y represents the output
    Output Section:
    Click browse and select a folder for the script to save the output files to
    The rest of this section should be self explanitory. NOTE: If you select to output 32bit files, the toning will not be applied, the files will simply be merged into a 32bit HDR image and saved.
    Once you have specified the input and output folders the OK button should be enabled, when you are ready, click OK to start the process
    Go watch a movie or take a nap, this is going to take a while. The script will display a progress window showing you how far along the proces is (the photoshop progress windows may occasionally appear on top of it, I usually just move them up a little so I can see both)
    Limitations:
    Only the local adaptation method is supported. It's really the only one I ever use, and I didn't really feel like implementing the other ones, but feel free to modify the script yourself to add this support
    You canot load or save presets from the builtin toning dialog. The format of the preset files is binary and would require reverse engineering of the format and it would be very difficult to read to the files in javascript anyway. If it were xml, it would be much easier, alas it is not. Feel free to grab a hex editor and do this yourself. For now you'll just have to copy all of the values of a preset by hand into the dialog if you want to use a preset. If I have more time this is something I might work on.
    Preview is slow because it has to do the actual full toning, I don't know a way to do the fast real time previews like the builtin dialog.
    I don't think the "Cancel" button on the progress window really works, once running, the script is too busy to register a click, anybody know how I might fix this?
    There may potentially be some ways to improve performance of this script in certain scenarios, IDK, but I'm just glad it works
    You're welcome Adobe, you can send me a check at:
    [REDACTED]
    [REDACTED]
    [REDACTED]
    Please hit me up with comments/suggestions,
    David

    Thank you for your script, it's very useful.
    I just changed a few things :
    The Checkboxes didn't work so I changed them :
    alignCheckBox.onChanged by alignCheckBox.onClick
    deghostCheckBox.onChanged by deghostCheckBox.onClick
    smoothEdgesBox.onChange by smoothEdgesBox.onClick
    And for best alignment, I changed :
    mergeToHDR.mergeFilesToHDR( currentFileList, false, hdrDeghosting ? kMergeToHDRDeghostBest : kMergeToHDRDeghostOff );
    by :
    mergeToHDR.mergeFilesToHDR( currentFileList, mergeToHDR.useAlignment, hdrDeghosting ? kMergeToHDRDeghostBest : kMergeToHDRDeghostOff );
    And lastly :
    My language is french so I had to modify loadPreset function because my own preset file contains the string "P a r   d é f a u t" in place of "D e f a u l t" so that the data is shifted.
    Here is the code :
    #target photoshop
    Batch HDR Script by David Milligan
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
    // BEGIN__HARVEST_EXCEPTION_ZSTRING
    <javascriptresource>
    <name>Batch HDR...</name>
    <menu>automate</menu>
    </javascriptresource>
    // END__HARVEST_EXCEPTION_ZSTRING
    //these lines import the 'Merge To HDR.jsx' script that is built in to photoshop, we will make calls to that script and some of the scripts that it includes
    var runMergeToHDRFromScript = true;
    var g_ScriptFolderPath = app.path + "/"+ localize("$$$/ScriptingSupport/InstalledScripts=Presets/Scripts");
    var g_ScriptPath = File( g_ScriptFolderPath+'/Merge To HDR.jsx' );
    $.evalFile( g_ScriptPath );
    //$.level = 2;
    //default settings:
    mergeToHDR.useAlignment = false;
    mergeToHDR.useACRToning = false;
    var numberOfBrackets = 3;
    var userCanceled = false;
    var sourceFolder;
    var outputFolder;
    var saveType = "JPEG";
    var jpegQuality = 10;
    var progress;
    var statusText;
    var progressWindow;
    var fileMask = "*";
    var outputFilename = "hdr_output_";
    var hdrRadius = 100;
    var hdrStrength = 0.5;
    var hdrGamma = 1.0;
    var hdrExposure = 0.0;
    var hdrDetail = 100;
    var hdrShadow = 0;
    var hdrHighlights = 0;
    var hdrVibrance = 20;
    var hdrSaturation = 30;
    var hdrSmooth = false;
    var hdrDeghosting = true;
    var hdrCurve = "0,0,255,255";
    var estTimeRemaining = "";
    var previewDoc;
    var originalDoc;
    function main()
        promptUser();
        //make sure user didn't cancel
        if(sourceFolder != null && outputFolder != null && sourceFolder.exists && outputFolder.exists && numberOfBrackets > 0)
            initializeProgress();
            var files =  sourceFolder.getFiles(fileMask);
            var currentFileList = new Array();
            for(var index = 0;  index < files.length; index++)
                if((index % numberOfBrackets) == numberOfBrackets - 1)
                    var start = new Date();
                    progress.value = 100 * index / files.length;
                    currentFileList.push(files[index]);
                    if(userCanceled) break;
                    if(numberOfBrackets > 1)
                        statusText.text = "Merging files "+(index-numberOfBrackets+2)+" - "+(index+1)+" of "+files.length + estTimeRemaining;
                        //for braketed exposures use the mergeToHDR script to merge the files into a single 32 bit image
                        mergeToHDR.outputBitDepth= 32;
                        mergeToHDR.mergeFilesToHDR( currentFileList, mergeToHDR.useAlignment, hdrDeghosting ? kMergeToHDRDeghostBest : kMergeToHDRDeghostOff );
                        statusText.text = "Toning files "+(index-numberOfBrackets+2)+" - "+(index+1)+" of "+files.length+ estTimeRemaining;
                    else
                        statusText.text = "Loading file "+(index+1)+" of "+files.length+ estTimeRemaining;
                        //otherwise just open the file
                        doOpenFile(files[index]);
                        statusText.text = "Toning file "+(index+1)+" of "+files.length+ estTimeRemaining;
                    progress.value = 100 * (index + numberOfBrackets / 2 ) / files.length;
                    if(userCanceled) break;
                    if(app.activeDocument != null)
                        //apply the actual tone mapping to the HDR image to get it back down to 8 bits
                        doHDRToning();
                    //save the result and close
                    //TODO: add leading zeros to index in filename
                    if(numberOfBrackets > 1)
                        statusText.text = "Saving result "+(index-numberOfBrackets+2)+" - "+(index+1)+" of "+files.length+ estTimeRemaining;
                    else
                        statusText.text = "Saving result "+(index+1)+" of "+files.length+ estTimeRemaining;
                    if(userCanceled) break;
                    doSaveFile(outputFolder.absoluteURI + "/" + outputFilename + ZeroPad(Math.round((index + 1)/numberOfBrackets), 5) );
                    activeDocument.close(SaveOptions.DONOTSAVECHANGES);
                    //reset our file list
                    currentFileList = new Array();
                    //calculate time remaining
                    var end = new Date();
                    var timeElapsed = end.getTime() - start.getTime();
                    var mins = timeElapsed / 60000 * ((files.length - index - 1) / numberOfBrackets);
                    estTimeRemaining = " | Remaining: " + ZeroPad((mins / 60).toFixed(0),2) + ":" + ZeroPad((mins % 60).toFixed(0),2);
                else
                    currentFileList.push(files[index]);
            progressWindow.hide();
    function doOpenFile(filename)
        const eventOpen = app.charIDToTypeID('Opn ');
        var desc = new ActionDescriptor();
        desc.putPath( typeNULL, new File( filename ) );
        desc.putBoolean( kpreferXMPFromACRStr, true ); //not sure what this does or if it is needed
        executeAction( eventOpen, desc, DialogModes.NO );
        //if we don't convert the image to 32bit the mergeToHDR script will not tone our image when we call it, it will simply downconvert it to 8 bit
        convertTo32Bit ();
    function convertTo32Bit()
        var idCnvM = charIDToTypeID( "CnvM" );
        var desc6 = new ActionDescriptor();
        var idDpth = charIDToTypeID( "Dpth" );
        desc6.putInteger( idDpth, 32 );
        var idMrge = charIDToTypeID( "Mrge" );
        desc6.putBoolean( idMrge, false );
        var idRstr = charIDToTypeID( "Rstr" );
        desc6.putBoolean( idRstr, false );
        executeAction( idCnvM, desc6, DialogModes.NO );
    function doSaveFile(filename)
        if(saveType == "JPEG")
            var jpgSaveOptions = new JPEGSaveOptions();
            jpgSaveOptions.embedColorProfile = true;
            jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;
            jpgSaveOptions.matte = MatteType.NONE;
            jpgSaveOptions.quality = jpegQuality;
            activeDocument.saveAs(new File(filename), jpgSaveOptions, true /*Save As Copy*/, Extension.LOWERCASE /*Append Extention*/);
        else if(saveType == "TIFF")
            var tifSaveOptions = new TiffSaveOptions();
            tifSaveOptions.embedColorProfile = true;
            activeDocument.saveAs(new File(filename), tifSaveOptions, true /*Save As Copy*/, Extension.LOWERCASE /*Append Extention*/);
        else if(saveType == "TIFF LZW")
            var tifSaveOptions = new TiffSaveOptions();
            tifSaveOptions.embedColorProfile = true;
            tifSaveOptions.imageCompression = TIFFEncoding.TIFFLZW;
            activeDocument.saveAs(new File(filename), tifSaveOptions, true /*Save As Copy*/, Extension.LOWERCASE /*Append Extention*/);
        else if(saveType == "TIFF ZIP")
            var tifSaveOptions = new TiffSaveOptions();
            tifSaveOptions.embedColorProfile = true;
            tifSaveOptions.imageCompression = TIFFEncoding.TIFFZIP;
            activeDocument.saveAs(new File(filename), tifSaveOptions, true /*Save As Copy*/, Extension.LOWERCASE /*Append Extention*/);
        else
            activeDocument.saveAs(new File(filename), undefined, true /*Save As Copy*/, Extension.LOWERCASE /*Append Extention*/);
    function doHDRToning()
        //TODO: Reverse engineer the HDR Preset file format and allow user to select a preset file and create the ActionDescriptor from the file
        //create the ActionDescriptor that describes the HDR toning settings to use
        var hdDesc = new ActionDescriptor;
        hdDesc.putInteger( stringIDToTypeID( 'version' ), 6 );//I'm not sure what this does
        hdDesc.putInteger(  kmethodStr, 3 );// the toning method to use, 3 = local adaptation
        hdDesc.putDouble( stringIDToTypeID( 'radius' ), hdrRadius );
        hdDesc.putDouble( stringIDToTypeID( 'threshold' ), hdrStrength );// strength
        hdDesc.putDouble( stringIDToTypeID( 'center' ), hdrGamma );// gamma
        hdDesc.putDouble( stringIDToTypeID( 'brightness' ), hdrExposure );// exposure
        hdDesc.putDouble( stringIDToTypeID( 'detail' ), hdrDetail );
        hdDesc.putDouble( stringIDToTypeID( 'shallow' ), hdrShadow );
        hdDesc.putDouble( stringIDToTypeID( 'highlights' ), hdrHighlights );
        hdDesc.putDouble( stringIDToTypeID( 'vibrance' ), hdrVibrance );
        hdDesc.putDouble( stringIDToTypeID( 'saturation' ), hdrSaturation);
        hdDesc.putBoolean( stringIDToTypeID( 'smooth' ), hdrSmooth );
        hdDesc.putBoolean( stringIDToTypeID( 'deghosting' ), hdrDeghosting );
        //create the tone curve
        var cDesc = new ActionDescriptor;
        cDesc.putString( stringIDToTypeID( 'name' ), 'Default');
        var cList = new ActionList;
        var points = hdrCurve.split(',');
        for(var i = 0; i < points.length; i++)
            if(i % 2 == 1)
                var pDesc = new ActionDescriptor;
                pDesc.putDouble( stringIDToTypeID( 'horizontal' ), points[i-1] );
                pDesc.putDouble( stringIDToTypeID( 'vertical' ), points[i] );
                pDesc.putBoolean( keyContinuity , false );// ?????
                cList.putObject( charIDToTypeID( 'Pnt ' ), pDesc );
        cDesc.putList( stringIDToTypeID( 'curve' ), cList );
        hdDesc.putObject( kclassContour, classShapingCurve, cDesc );
        //call the script that actually invokes the toning plugin
        convertFromHDRNoDialog( outputBitDepth, hdDesc );
    function initializeProgress()
        progressWindow = new Window("palette { text:'Batch HDR Progress', \
            statusText: StaticText { text: 'Processing Images...', preferredSize: [350,20] }, \
            progressGroup: Group { \
                progress: Progressbar { minvalue: 0, maxvalue: 100, value: 0, preferredSize: [300,20] }, \
                cancelButton: Button { text: 'Cancel' } \
        statusText = progressWindow.statusText;
        progress = progressWindow.progressGroup.progress;
        progressWindow.progressGroup.cancelButton.onClick = function() { userCanceled = true; }
        progressWindow.show();
    function promptUser()
        var setupWindow = new Window("dialog { orientation: 'row', text: 'Batch HDR', alignChildren:'top', \
            leftGroup: Group { orientation: 'column', alignChildren:'fill', \
                inputPanel: Panel { text: 'Input', \
                    sourceGroup: Group { \
                        sourceBox: EditText { characters: 40, text: '' }, \
                        sourceBrowse: Button { text: 'Browse' } \
                    bracketGroup: Group{ \
                        bracketLabel: StaticText { text: 'Number of Brackets: ' }, \
                        bracketBox: EditText { characters: 2 }, \
                        filterLabel: StaticText { text: 'File Filter: ' }, \
                        filterText: EditText { characters: 5 }, \
                        alignCheckBox: Checkbox { text: 'Align' }\
                        deghostCheckBox: Checkbox { text: 'Deghost' }\
                toningPanel: Panel { text: 'Toning', orientation:'row', alignChildren:'top' } ,\
                outputPanel: Panel { text: 'Output', \
                    outputGroup: Group { \
                        outputBox: EditText { characters: 40, text: '' }, \
                        outputBrowse: Button { text: 'Browse' } \
                    outputOptionsGroup: Group { \
                        outputFilenameLabel: StaticText { text: 'Filename Format: ' }, \
                        outputFilenameText: EditText { characters: 10 }, \
                        outputFilenamePost: StaticText { text: '00001.jpg' }, \
                    saveSettingsGroup: Group { \
                        saveTypeLabel: StaticText { text: 'Save As: ' }, \
                        saveDropDown: DropDownList { }, \
                        jpegQualityLabel: StaticText { text: 'JPEG Quality (1-10): ' }, \
                        jpegQualityText: EditText { characters: 2}, \
                        outputBitDepthLabel: StaticText { text: 'Bit Depth', enabled:false }, \
                        outputBitDepthDropDown: DropDownList { enabled:false }, \
            rightGroup: Group { orientation: 'column', alignChildren:'fill', \
                okButton: Button { text: 'OK', enabled: false } \
                cancelButton: Button { text: 'Cancel' } \
        generateToningPanel(setupWindow.leftGroup.toningPanel);
        //shortcut variables
        var sourceBox = setupWindow.leftGroup.inputPanel.sourceGroup.sourceBox;
        var sourceBrowse = setupWindow.leftGroup.inputPanel.sourceGroup.sourceBrowse;
        var bracketBox = setupWindow.leftGroup.inputPanel.bracketGroup.bracketBox;
        var filterText = setupWindow.leftGroup.inputPanel.bracketGroup.filterText;
        var alignCheckBox = setupWindow.leftGroup.inputPanel.bracketGroup.alignCheckBox;
        var outputBox = setupWindow.leftGroup.outputPanel.outputGroup.outputBox;
        var outputBrowse = setupWindow.leftGroup.outputPanel.outputGroup.outputBrowse;
        var outputFilenameText = setupWindow.leftGroup.outputPanel.outputOptionsGroup.outputFilenameText;
        var saveDropDown = setupWindow.leftGroup.outputPanel.saveSettingsGroup.saveDropDown;
        var jpegQualityText = setupWindow.leftGroup.outputPanel.saveSettingsGroup.jpegQualityText;
        var jpegQualityLabel = setupWindow.leftGroup.outputPanel.saveSettingsGroup.jpegQualityLabel;
        var outputBitDepthDropDown = setupWindow.leftGroup.outputPanel.saveSettingsGroup.outputBitDepthDropDown;
        var outputBitDepthLabel = setupWindow.leftGroup.outputPanel.saveSettingsGroup.outputBitDepthLabel;
        var okButton = setupWindow.rightGroup.okButton;
        var cancelButton = setupWindow.rightGroup.cancelButton;
        var toningPanel = setupWindow.leftGroup.toningPanel;
        var deghostCheckBox = setupWindow.leftGroup.inputPanel.bracketGroup.deghostCheckBox;
        //set default values
        bracketBox.text = numberOfBrackets;
        filterText.text = fileMask;
        //mergeToHDR.useAlignment = true;
        alignCheckBox.value = mergeToHDR.useAlignment;
        deghostCheckBox.value = hdrDeghosting;
        outputFilenameText.text = outputFilename;
        jpegQualityText.text = jpegQuality;
        saveDropDown.add("item", "JPEG");
        saveDropDown.add("item", "TIFF");
        saveDropDown.add("item", "TIFF LZW");
        saveDropDown.add("item", "TIFF ZIP");
        saveDropDown.add("item", "PSD");
        saveDropDown.selection = 0;
        outputBitDepthDropDown.add("item", "8");
        outputBitDepthDropDown.add("item", "16");
        outputBitDepthDropDown.add("item", "32");
        outputBitDepthDropDown.selection = 0;
        //event handlers
        sourceBox.onChange = function()
            sourceFolder = new Folder(sourceBox.text);
            okButton.enabled = sourceFolder != null && outputFolder != null && sourceFolder.exists && outputFolder.exists;
        sourceBrowse.onClick = function()
            sourceFolder = Folder.selectDialog ("Select the source folder");
            if(sourceFolder != null)
                sourceBox.text = sourceFolder.fullName;
            okButton.enabled = sourceFolder != null && outputFolder != null && sourceFolder.exists && outputFolder.exists;
        bracketBox.onChange = function() { numberOfBrackets = bracketBox.text; };
        filterText.onChange = function() { fileMask = filterText.text; };
        alignCheckBox.onClick = function() { mergeToHDR.useAlignment = alignCheckBox.value; };
        deghostCheckBox.onClick = function() { hdrDeghosting = deghostCheckBox.value; };
        outputBox.onChange = function()
            outputFolder = new Folder(outputBox.text);
            okButton.enabled = sourceFolder != null && outputFolder != null && sourceFolder.exists && outputFolder.exists;
        outputBrowse.onClick = function()
            outputFolder = Folder.selectDialog ("Select the output folder");
            if(outputFolder != null)
                outputBox.text = outputFolder.fullName;
            okButton.enabled = sourceFolder != null && outputFolder != null && sourceFolder.exists && outputFolder.exists;
        outputFilenameText.onChange = function() { outputFilename = outputFilenameText.text; };
        saveDropDown.onChange = function()
            saveType = saveDropDown.selection.text;
            jpegQualityText.enabled = saveDropDown.selection.text == "JPEG";
            jpegQualityLabel.enabled = saveDropDown.selection.text == "JPEG";
            if(saveDropDown.selection.text == "JPEG")
                outputBitDepthDropDown.selection = 0;
            outputBitDepthDropDown.enabled = saveDropDown.selection.text != "JPEG";
            outputBitDepthLabel.enabled = saveDropDown.selection.text != "JPEG";
        jpegQualityText.onChange = function() { jpegQuality = jpegQualityText.text; };
        outputBitDepthDropDown.onChange = function()
            outputBitDepth = outputBitDepthDropDown.selection.text;
            toningPanel.enabled = outputBitDepth != 32;
        okButton.onClick = function() { setupWindow.hide(); cleanUpPreviews(); };
        cancelButton.onClick = function() { sourceFolder = null, setupWindow.hide(); cleanUpPreviews(); };
        saveDropDown.onChange();
        outputBitDepthDropDown.onChange();
        setupWindow.show();
    function cleanUpPreviews()
        if(originalDoc != null)
            originalDoc.close(SaveOptions.DONOTSAVECHANGES);
            originalDoc = null;
        if(previewDoc != null)
            previewDoc.close(SaveOptions.DONOTSAVECHANGES);
            previewDoc = null;
    function generateToningPanel(toningPanel)
        var leftToningGroup = toningPanel.add("group{orientation:'column',alignChildren:'fill'}");
        var rightToningGroup = toningPanel.add("group{orientation:'column',alignChildren:'fill'}");
        var presetGroup = leftToningGroup.add("group{orientation:'row'}");
        var presetDropDown = presetGroup.add("dropdownlist");
        var loadPresetButton = presetGroup.add("button", undefined, "Load Preset");
        var edgePanel = leftToningGroup.add("panel",undefined,"Edge Glow");
        var radiusSlider = createSliderControl(edgePanel.add("group"), "  Radius: ", "px", 0, 500, 0, hdrRadius, function(newValue){ hdrRadius = newValue; });
        var strengthSlider = createSliderControl(edgePanel.add("group"), "Strength: ", "", 0, 4.0, 2, hdrStrength, function(newValue){ hdrStrength = newValue; });
        var edgeGroup = edgePanel.add("group");
        var smoothEdgesBox = edgeGroup.add("checkbox",undefined, "Smooth Edges");
        var detailPanel = leftToningGroup.add("panel",undefined,"Tone and Detail");
        var gammaSlider = createSliderControl(detailPanel.add("group"), "  Gamma: ", "", 0.1, 2.0, 2, hdrGamma, function(newValue){ hdrGamma = newValue; });
        var exposureSlider = createSliderControl(detailPanel.add("group"), "Exposure: ", "", -5.0, 5.0, 2, hdrExposure, function(newValue){ hdrExposure = newValue; });
        var detailSlider = createSliderControl(detailPanel.add("group"), "     Detail: ", "%", -300, 300, 0, hdrDetail, function(newValue){ hdrDetail = newValue; });
        var advancedPanel = leftToningGroup.add("panel",undefined,"Advanced");
        var shadowSlider = createSliderControl(advancedPanel.add("group"), "  Shadow: ", "%", -100, 100, 0, hdrShadow, function(newValue){ hdrShadow = newValue; });
        var highlightSlider = createSliderControl(advancedPanel.add("group"), " Highlight: ", "%",  -100, 100, 0, hdrHighlights, function(newValue){ hdrHighlights = newValue; });
        var vibranceSlider = createSliderControl(advancedPanel.add("group"), "  Vibrance: ", "%",  -100, 100, 0, hdrVibrance, function(newValue){ hdrVibrance = newValue; });
        var saturationSlider = createSliderControl(advancedPanel.add("group"), "Saturation: ", "%",  -100, 100, 0, hdrSaturation, function(newValue){ hdrSaturation = newValue; });
        var toningCurvePanel = leftToningGroup.add("panel{text:'Toning Curve',alignChildren:'fill'}");
        var curveBox = toningCurvePanel.add("edittext", undefined, hdrCurve);
        //right side (preview panel)
        var previewGroup = rightToningGroup.add("panel", undefined, "Preview");
        var selectPreviewButton = previewGroup.add("button",undefined,"Select File(s)...");
        var previewButton = previewGroup.add("button",undefined,"Update Preview");
        var zoomGroup = previewGroup.add("group");
        zoomGroup.add("statictext",undefined, "zoom");
        var zoomBox = zoomGroup.add("edittext { text: '100', characters: 3, enabled: false } ");
        var previewZoomSlider = previewGroup.add("slider { minvalue: 10, maxvalue: 200, value: 100, enabled: false }");
        //default values
        smoothEdgesBox.value = hdrSmooth;
        previewButton.enabled = app.documents.length > 0;
        var presetFiles = getPresetFiles();
        var updateSliders = function()
            radiusSlider(hdrRadius);
            strengthSlider(hdrStrength);
            smoothEdgesBox.value = hdrSmooth;
            exposureSlider(hdrExposure);
            gammaSlider(hdrGamma);
            detailSlider(hdrDetail);
            shadowSlider(hdrShadow);
            highlightSlider(hdrHighlights);
            vibranceSlider(hdrVibrance);
            saturationSlider(hdrSaturation);
            curveBox.text = hdrCurve;
        if(presetFiles.length > 0)
            for(var f in presetFiles)
                presetDropDown.add("item", presetFiles[f].displayName.replace(".hdt",""));
            presetDropDown.selection = 0;
            loadPreset(presetFiles[0]);
            presetDropDown.onChange = function()
                loadPreset(presetFiles[presetDropDown.selection.index]);
                updateSliders();
        //event handlers
        loadPresetButton.onClick = function()
            loadPreset(null);
            updateSliders();
        smoothEdgesBox.onClick = function () { hdrSmooth = smoothEdgesBox.value; };
        curveBox.onChange = function () { hdrCurve = curveBox.text; };
        selectPreviewButton.onClick = function()
            var selectedFiles = File.openDialog("Select file(s) to load for preview", function(){return true;}, true);
            if(selectedFiles != null)
                cleanUpPreviews();
                if(selectedFiles instanceof Array)
                    if(selectedFiles.length > 1)
                        mergeToHDR.outputBitDepth= 32;
                        mergeToHDR.mergeFilesToHDR( selectedFiles, false, -2 );
                    else
                        doOpenFile(selectedFiles[0].fullName);
                else
                    doOpenFile(selectedFiles.fullName);
                originalDoc = app.activeDocument;
                previewButton.enabled = originalDoc != null;
                zoomBox.text = getZoomLevel();
                previewZoomSlider.value = getZoomLevel();
        previewButton.onClick = function()
            if(originalDoc != null)
                var tempOutputBitDepth = outputBitDepth;
                outputBitDepth = 16;
                if(previewDoc != null)
                    previewDoc.close(SaveOptions.DONOTSAVECHANGES);
                previewDoc = originalDoc.duplicate("HDR Preview");
                app.activeDocument = previewDoc;
                setZoomLevel(previewZoomSlider.value);
                convertTo32Bit();
                doHDRToning();
                outputBitDepth = tempOutputBitDepth;
                waitForRedraw();
                zoomBox.enabled = previewDoc != null;
                previewZoomSlider.enabled = previewDoc != null;
        zoomBox.onChange = function()
            if(previewDoc != null)
                previewZoomSlider.value = zoomBox.text;
                setZoomLevel(previewZoomSlider.value);
        previewZoomSlider.onChange = function()
            if(previewDoc != null)
                zoomBox.text = previewZoomSlider.value.toFixed(0);
                setZoomLevel(previewZoomSlider.value);
        updateSliders();
    function createSliderControl(group,label,postLabel,min,max,round,value,onValueChanged)
        var ignoreChange = false;
        group.add("statictext", undefined, label);
        var slider = group.add("slider",undefined,value,min,max);
        slider.alignment = "fill";
        var box = group.add("edittext",undefined,value);
        box.characters = 6;
        group.add("statictext", undefined, postLabel);
        slider.onChange = function()
            if(!ignoreChange)
                ignoreChange = true;
                box.text = slider.value.toFixed(round);
                onValueChanged(slider.value);
                ignoreChange = false;
        box.onChange = function()
            if(!ignoreChange)
                ignoreChange = true;
                slider.value = box.text;
                onValueChanged(box.text);
                ignoreChange = false;
        return function(newValue)
            slider.value = newValue;
            box.text = newValue.toFixed(round);
    //forces a redraw while a script dialog is active (for preview)
    var waitForRedraw = function()
        var desc = new ActionDescriptor();
        desc.putEnumerated(charIDToTypeID("Stte"), charIDToTypeID("Stte"), charIDToTypeID("RdCm"));
        executeAction(charIDToTypeID("Wait"), desc, DialogModes.NO);
    function getZoomLevel()
        var ref = new ActionReference();
        ref.putEnumerated( charIDToTypeID("Dcmn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
        var desc = executeActionGet(ref);
        return Number(desc.getDouble(stringIDToTypeID('zoom'))*100).toFixed(1);
    function setZoomLevel( zoom )
        if(zoom < 1 ) zoom =1;
        var ref = new ActionReference();
        ref.putEnumerated( charIDToTypeID("capp"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
        var getScrRes = executeActionGet(ref).getObjectValue(stringIDToTypeID('unitsPrefs')).getUnitDoubleValue(s tringIDToTypeID('newDocPresetScreenResolution'))/72;
        var docRes = activeDocument.resolution;
        activeDocument.resizeImage( undefined, undefined, getScrRes/(zoom/100), ResampleMethod.NONE );
        var desc = new ActionDescriptor();
        ref = null;
        ref = new ActionReference();
        ref.putEnumerated( charIDToTypeID( "Mn  " ), charIDToTypeID( "MnIt" ), charIDToTypeID( 'PrnS' ) );
        desc.putReference( charIDToTypeID( "null" ), ref );
        executeAction( charIDToTypeID( "slct" ), desc, DialogModes.NO );
        activeDocument.resizeImage( undefined, undefined, docRes, ResampleMethod.NONE );
    function ZeroPad(number,numZeros)
        var result = number.toString();
        while(result.length < numZeros)
            result = "0" + result;
        return result;
    var getPresetFiles = function()
        var presetFolder = new Folder(app.path + "/Presets/HDR Toning");
        return presetFolder.getFiles("*.hdt");
    var loadPreset = function(presetFile)
        if(presetFile == null)
            presetFile = File.openDialog("Select Preset","*.hdt");
        if(presetFile != null)
            var tmpStr = new String();
            var binaryData = new Array();
            presetFile.encoding = "BINARY";
            presetFile.open('r');
            while(!presetFile.eof)
                var ch = presetFile.readch();
                if ( ch.charCodeAt(0) == 0 ){
                    tmpStr += ' ';
                else {
                    tmpStr += ch;
                binaryData.push(ch.charCodeAt(0));
            presetFile.close();
            if(binaryData.length >= 40)
                // init start position for reading datas
                // start position for english version ( string "D e f a u l t" is in the preset file )
                var startPos = 38;
                if ( tmpStr.search ("P a r   d é f a u t") > -1 ){
                    // start position for french preset file version ( string "P a r   d é f a u t" is in the preset file ) (==> + 6 bytes)
                    startPos = 44;
                // if your preset file can't be read, try this : open it in notepad to see the string "D e f a u l t" in your language and add the code here to set startPos to 38 + diff between the length of ("D e f a u l t") and length of ("D e f a u l t" in your language)
                var curvePointCount = getUInt16(binaryData, startPos);
                if(binaryData.length >= 104 + curvePointCount * 4)
                    var curvePointStr = "";
                    for(var i = 0; i < curvePointCount; i++)
                        curvePointStr += getUInt16(binaryData, startPos + 4 + i * 4) + "," + getUInt16(binaryData, startPos + 2 + i * 4) + ((i < curvePointCount - 1) ? "," : "");
                    hdrCurve = curvePointStr;
                    hdrStrength =  getFloat32(binaryData,8);
                    hdrRadius = getFloat32(binaryData, startPos + 10 + 5 * curvePointCount);
                    hdrExposure = getFloat32(binaryData, startPos + 34 + 5 * curvePointCount);
                    hdrSaturation = getFloat32(binaryData, startPos + 38 + 5 * curvePointCount);
                    hdrDetail = getFloat32(binaryData, startPos + 42 + 5 * curvePointCount);
                    hdrShadow = getFloat32(binaryData, startPos + 46 + 5 * curvePointCount);
                    hdrHighlights = getFloat32(binaryData, startPos + 50 + 5 * curvePointCount);
                    hdrGamma = getFloat32(binaryData, startPos + 54 + 5 * curvePointCount);
                    hdrVibrance = getFloat32(binaryData, startPos + 58 + 5 * curvePointCount);
                    hdrSmooth = getUInt16(binaryData, startPos + 62 + 5 * curvePointCount) != 0;
                else
                    alert("Error Loading File", "Error", true);
            else
                alert("Error Loading File", "Error", true);
    function getUInt16(byteArray,offset)
        return byteArray[offset] * 0x100 + byteArray[offset + 1];
    function getUInt32(byteArray,offset)
        return byteArray[offset] * 0x1000000 + byteArray[offset + 1] * 0x10000 + byteArray[offset + 2] * 0x100 + byteArray[offset + 3];
    function getFloat32(byteArray,offset)
        var bytes = getUInt32(byteArray,offset);
        var sign = (bytes & 0x80000000) ? -1 : 1;
        var exponent = ((bytes >> 23) & 0xFF) - 127;
        var significand = (bytes & ~(-1 << 23));
        if (exponent == 128)
            return sign * ((significand) ? Number.NaN : Number.POSITIVE_INFINITY);
        if (exponent == -127) {
            if (significand == 0) return sign * 0.0;
            exponent = -126;
            significand /= (1 << 22);
        } else significand = (significand | (1 << 23)) / (1 << 23);
        return sign * significand * Math.pow(2, exponent);
    main();

  • Can I create a canvas in Aperture?

    Hi,
    I need to order 5x7 images on 8x10 sheets on line.
    Apparently, in Photoshop, one creates a canvas to one's specifications and then send the new file to be printed accordingly.
    How do we achieve that in Aperture? Can we?
    I  know it can be done when ordering books via Aperture.
    Thanks,
    Raphael

    Raphael, I have no idea, what could be different in your case.
    I just select the image and export it using BorderFX:
    In BorderFX:
    And the exported image on my Desktop:
    And exporting the image again, after adding a retouche and exporting regularly:
    So, exporting is still working for me. Did you use BorderFX as "Edit" plug-in or "Export" plug-in?
    Try to  use the "Export" version of the plug-in.
    So, how to fix your broken "Export"?
    Have you tried to change the "Export" preset in your "Export" panel?
    If that does not help, I'd Quit Aperture. and remove the file
    ~/Library/Application Support/Aperture/Export Presets.plist
    from your user library.
    Also the sandbox: 
    ~/Library/Containers/com.apple.Aperture/Data/Library/
    Then reboot.

  • About printing with Aperture

    When I print with PS or any other application (e.i.: Pages) always appears the presets that I have calibrated for printing with my three favorites papers, but with Aperture these presets do not appears and the dialogue of the printer is complety different.
    Does anybody knows how can I solve this?

    Hi
    I found this article on the apple website to be super helpful. I now get the most accurate prints from Aperture, noticeably superior to anything other program I've tried printing from..
    http://support.apple.com/kb/HT2026

  • GR3 Presets not Saving

    I have Audition 3 and the VST Guitar Rig 3 by Native Instruments. I've recorded a few tracks with the Guitar Rig 3 set as my fx. The effects are applied correctly and stay until I restart the program. When I re-open audition, it still says Guitar Rig 3 under FX but the preset internally in GR3 isn't saving. So instead of the preset sound in my wav I have the guitar sound without any distortion. I figured out that freezing the files keeps the presets - but it's a hassle to freeze them all and unfreeze them when I want to edit the tracks. Is there something I'm missing? or is this something that's on NI's end? Thx in advance.

    Bob Rockefeller wrote:
    Flat Eric wrote:
    Well, good old Time Machine has saved the day and now at least I'm back to where I was before, I can now edit the PrintPreset.plist file directly to add my presets. Still not sure how AP2 stopped this when AP3 was loaded afterwards, but at least my clunky work around is working again until (hopefully) this is fixed with another update.
    Hmmmm. My Aperture 3 print presets file is named PrintLayoutPresets.plist
    The Aperture pront presets file was named PrintPresets.plist
    I can't edit PrintLayoutPresets.plist with the Property List Editor and get anything to stick. PrintLayoutPresets.plist also does not have the same fields as PrintPresets.plist - for example there doesn't seem to be a way to set color profiles different for each preset. If I change a color profile in a duplicated preset, the gear menu dies not give me the option to save. Same as if I change the paper size.
    Everything else I've tried with Aperture 3 has worked - nothing Aperture 3.0.1 addressed caused me any trouble. This is my only issue (at least so far) with Aperture 3.
    Bob
    Hi Bob
    I'm editing a file called PrintPresets.plist which resides at User->Library->ApplicationSupport->Aperture and this does seem to be working with a direct edit of the file. I don't find the PrintLayoutPresets.plist file inside AP3 helps either. Like you apart from this issue everything else seems to be working well, it would be nice to get this solved as well.
    I'm off for a few days now I'm not taking my MBP with me - I'll keep an eye on the thread with my iPhone but probably won't respond due to it's form factor. Roll on the iPad for times like this
    Take care
    FlatE

  • Recorded HDR, Want to Export 4:3

    Hi
    I am setting up a project for the first time, doing a corporate video for a
    relative's company.
    Shot the footage using a Sony Handycam HDR
    Footage is mt2s format, (no prob importing into Premiere, got codec)
    1920x1080x32
    I have done a test import using hdr preset with those dimensions, but is that the right way to go?
    Or is that only if I want those settings as the final product?
    Little confused, all the export tutorials I watched only skirt the issue and
    go into all the wonderful formats available.
    But what if I shot in widescreen hdr and want to out put to tv
    What is best method?
    Prob is once, you set Premiere one way, only way to reset is to recreate project,
    Have I done it right or wrong so far?
    Should I have set the project up as 4:3 regardless of initial capture footage, or should I set it to footage and then export differently?
    I want to be sure I don't end up with distorted perspective, and I figured like Sony Vegas, somewhere along the way I could edit my framesizes and zooms in the software.
    Haven't even see how to do that yet except for in effects.
    Is there no way to drag to view in the project preview window?
    THANKS
    S
    adobepremiereforum [@] seph.ca for direct reply.

    Did you try using an SD Preset Project and importing the files into that project.
    If they play nicely in the timeline. 'Scale' them down to either full vertical height (Centre frame extraction) or full horizontal width (Bars top and bottom).
    It this works I would suggest you edited in a native project then exported it to an SD Project. Quicker and easier.
    (For the record. I do this with 720p original files that I need as SD exports.)

  • Aperture batch file rename: remove dashes from date?

    Just wondering if it is possible to change the format of the date from YYYY-MM-DD to YYYYMMDD when you rename files as they are imported into Aperture 3? I In Aperture 3, the date format used includes dashes. I would like to have the file renamed without the dashes in the date. Is this possible?
    This question was previously asked and answered in 2010, however Aperture does not seem to have an option for this it the batch rename edit menu. Thanks

    It is not possible in the Aperture naming presets to remove the dashes or in any way change the date format.
    The reason is that it is not possible to access the individual components of the date. When you drag an Image Date or Current Date token to form the filename you can't just get the day or the month or the year which is what you would have to be able to do to remove the dashes.
    There is no technical reason this couldn't be allowed, Apple has just made the decision that it won't be allowed. You can try sending feedback to Apple requesting this, see Aperture->Provide Aperture Feedback.
    It is possible to do what you want either before you import the files or with an Applescript eitehr beforre import or within Aperture.
    For doing it before import you would basically copy the image files from the  camera card to a folder and then import from there. There are several programs that you could use to do the rename, Name Mangler has been mentioned here a few times. I've never used it so I can;t vouch for it.
    As for an in Aperture Applescript solution if you are familair with programming and/or Applescript it isn't to difficult to do but would be easier with some prior knowledge.
    regards

  • Aperture/Photoshop Color Control Issues

    I am photographer that has been doing the unthinkable for the past four years – I use the Finder to scroll through pictures I’ve taken and load them one-by-one into Photoshop CS4 for editing. I know this is dumb, and I really want to change my workflow. I’ve really like Aperture, but it has one fatal flaw (and one minor flaw) that is preventing me from using it. I desperately need help, as I estimate I need to review and edit 50,000+ images this year!
    I’ll give you as best of a description of each problem and everything I can remember that I’ve tried. Note, that these issues replicate on three different Mac (all also clean installs), Mac OS 10.5 and 10.6, a PC, and the issue is the same with Lightroom 2 and 3 Beta, as well as Aperture 2 and 3. I must be doing something really dumb!
    The Major Problem:
    So I start off with a picture like this in Aperture (it may be useful to open images in multiple tabs):
    http://img210.imageshack.us/img210/5585/28037816.png
    So, I go to work making my adjustments to the RAW file (a NEF, since I shoot Nikon) and end up with something like this:
    http://img23.imageshack.us/img23/3703/43700549.png
    Now I right click on the picture and go to edit it in Photoshop CS4. I have my format set to work in 8-bit PSD files at 300 dpi(Aperture>Preferences>Export), and am using the sRGB IEC61966-2.1 color profile embedded in the picture. My proofing profile in Aperture is also set to this same profile (View>Proofing Profile), as well as the working profile in Photoshop CS4 (Edit>Color Settings). And this is what I get:
    http://img339.imageshack.us/img339/9311/35278285.png
    Note that I haven’t made a single adjustment in Photoshop! It just opens that way!
    Let’s say I go a step further and try to recover my desaturated image. I’ll apply a series of filters here that I normally wouldn’t for this image, but will do here to further illustrate my point. Here’s what I produce:
    http://img249.imageshack.us/img249/6954/97748984.png
    And now for the fun part. I save (File>Save) the image in Photoshop making sure to Maximize compatibility (since Aperture can’t seem to read it if I don’t select this) and Aperture faithfully works to update the preview of the image. Unfortanately, the image now looks like this:
    http://img101.imageshack.us/img101/9811/77252849.png
    So basically, I have no color management occurring from program to program. I know photographers use both of these programs successfully, but I just can’t make them preserve color faithfully! It happens with TIFF files, it occurs no matter if I use a PC, or either version of Aperture or Lightroom! I’ve tried multiple Macs and multiple OS versions, and am clearly missing something.
    Help me!
    (The minor issue I described above may be corrected if we can get this fixed, so I’ll follow-up if needed.)

    Lets see if we can figure this out.
    I personally use a calibrated Apple Cinema Display to start with so maybe that makes a difference.
    So, in Aperture do this
    1) edit the image of choice
    2) if you like go ahead and set the onscreen proofing profile -let's use sRGB 2.1 in this example
    — View>Proofing Profile then select sRGB on the top
    3) Then select the "Onscreen Proofing" so it is checked also under the View menu
    4) Go to your Aperture Export presets
    — Aperture>Presets>Image Export
    5) The very top preset usually is "JPEG - Original Size"
    — make sure the color profile is "sRGB IEC61966-2.1"
    — make sure "Black Point Compensation" is NOT checked
    Now, the image you just edited go ahead and "export Version" and save it to the desktop
    When done open it in Photoshop.
    Make sure that your color settings in Photoshop is set to sRGB
    HOWEVER, if it isn't, you may get a message that the "embedded profile does not match your working space in photoshop"
    NOTE: if Photoshop is set to Adobe RGB , that too is ok and that's when you will get the "mismatch profile message"
    So, IF you DO get that message, the rule is ALWAYS Honor the embedded profile of the image/photo
    If your Photoshop is set to sRGB too, then you won't need to worry about this.
    If your image still looks washed out at this point let us know.
    In my case what I export from Aperture 3 looks the same in Photoshop CS4
    Message was edited by: Falcon01

  • Aperture 3.5.1 Import panel empty after iTunes 11.2.1 security update

    Just a coincidence?
    When I installed the recent iTunes 11.2.1 (1) security update, that directly followed the combined MacOS X 10.9.3 / iTunes 10.2 update, I got a warning, that Aperture had to be quit before installing the update.
    After relaunching Aperture the Aperture Import panel stopped working:
    The fonts in list view were upside down:
    The Toolbar was empty and only gradually items kept reappearing.
    The File Chooser and the Import settings bricks were empty.
    Aperture was hanging on "Loading Assets" and not very responsive.
    Clicking onto the empty bricks did occasionally reveal a pop-up menu:
    This problem seems to be fixed, after I trashed Preferences and Presets:
    ~/Library/Preferences/com.apple.Aperture.plist
    ~/Library/Containers/com.apple.Aperture
    ~/Library/Application Support/Aperture/Import Presets.plist
    But I would like to know, if anybody else had similar problems with Aperture after the recent MacOS X 10.9.3 / iTunes 11.2.1 update.
    SInce this iTunes update fixes a security issue it should not be skipped.

    It was just a coincidence   Sorry, iTunes!
    The problem was, that a broken file on my Desktop messed up the Import panel.
    As soon as I add a certain empty PDF file with the name "119435-45-55 [6L].pdf" to my Desktop, strange things will happen with the Import panel on all three of my Macs running MacOS X 10.9.3 and Aperture 3.5.1. It took me a while to identify the file, because Aperture does show the filename as empty and does not show a preview.
    The Import window will be messed up -
    missing icons from the Toolbar and Import settings pane,
    the File Chooser will be empty,
    the busy indicator will show "Loading assets", and the Activity Window "Building Thumbnails"
    The thumbnail of the corrupted file will be empty and the filename is showing as empty,
    When I switch to list view, all text will be upside down as shown in my original post.
    The problem is not caused by the brackets in the filename; if I rename the file, Aperture is still acting up. The file cannot be opened in Preview either.

  • Exporting from Aperture - .DS Store error

    When I try to export a photo to my desktop, I get this error: 0 (of 1) file has been exported to: Users/*****/Desktop/.DS_Store The export operation failed to create a file for the version identified below:
    IMG_4496
    What do I do to fix this? I tried export to different folders besides the desktop and I get the same error. I tried repairing permissions (on my Mac) and tried fixing permissions and repairing the library in Aperture.
    Thanks.

    Users/*****/Desktop/.DS_Store
    Aperture is creating a wrong filename on export. What is the export preset you are using?
    Try, if you can export at all by using a different preset in the export dialog, like "jpeg half size" or something.
    If that does not work, try to delete the export preset list from the user library:
    Quit Aperture and remove this file: 
    /Users/your-user_name/Library/Application Support/Aperture/Export Presets.plist
    Then log off and on again, and try, if it now is working.
    Note:Your User Library is hidden by default in 10.7.x or later - to open it in a Finder window use the "Go" menu from the Finder's main menu bar.
    Quit Aperture, if it is running. Log off and on again.
    Open the user library by using the Finder's "Go > Go to Folder" menu and hold down the options-key, until "Library" appears in the drop down menu. Select it.
    In the widow that will open, scroll down to "Application Support", open the "Aperture" folder.
    From the "Apertue" folder  remove "Export Presets.plist".

Maybe you are looking for

  • Creation of company code

    I have created a company code by copying (coppy as ) the standard company code 0001. While copying it was shown that some of the entries was copied successfully but some of was not . I have mainted P.org, site , storage location . But while craeting

  • Varray in Oracle 8i

    Hello Oracle World, I have one Problem with an varray. Problem description: I get a string like '123|456|789|...' into the procedure. I have changed the string with a replace function "v_rufnummer_mod:=''''||replace(v_rufnummer,'|',''',''')||'''';" -

  • How to UNZIP broken archive?

    Unrar can extract files from broken archive ("-kb" option, keep broken). $ unrar x -kb half-downloaded-file.rar How to extract files from broken ZIP?

  • OLE-Word with table

    Hi, i use OLE-Word to create a table in a word document and fill them. That's work OK, but i will position the table on a specific Positon on the page. Position shell be horizontal 7 and vertical 8. I have tried it with recording in word, bot i don't

  • How to host custom wcf service on office 365

    hi all, I am working with project online using client object model 2013.I want to host custom wcf services on project online teant. hosting service on cloud. Please suggest me. vijay