Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- REM Enable Delayed Expansion
- setlocal enabledelayedexpansion
- REM Change to the directory where the script is located
- cd /d "%~dp0"
- REM Clear the terminal screen
- cls
- REM Tool Intro Text
- echo Anamorphic DNG EXIF DeSqueeze for Exiftool - written by Rupert Warries for Windows
- echo.
- echo ------------
- echo.
- echo This Tool will rewrite each DNG's EXIF data to allow Lightroom to render each image de-squeezed in DEVELOP module (library will still show squeezed image - any program that reads the pixel ratio in EXIF will also work).
- echo.
- echo USAGE INSTRUCTION :
- echo 1. Place this script inside the folder containing the DNG images for processing
- echo 2. Drag tool into a terminal window to run and follow the prompts
- echo 3. DNG filenames must contain no spaces - run the tool by dragging into a terminal window and following the prompts
- echo 4. An installation of Exiftool must be present for this script to operate
- echo.
- echo ------------
- echo.
- REM Show the directory and ask for confirmation
- echo All DNG files present will be de-squeezed in the following directory:
- echo %cd%
- set /p confirm=Do you want to continue? (Y/N):
- REM Check user input
- if /i "%confirm%" neq "Y" (
- echo Processing cancelled.
- exit /b 1
- )
- REM Ask for Squeeze factor and Loop until a valid number is entered
- :input
- set /p squeeze_factor=Enter the lens squeeze factor - Must be at least one decimal (e.g. 1.0, 1.33, 1.5, 2.0):
- REM Show the entered value and ask for confirmation
- echo Is the input formatted to one or more decimal places? (e.g. 1.0 or 1.33 - other values could damage the DNG):
- echo %squeeze_factor%
- set /p confirm=Confirm the input is formatted correctly? (Y/N):
- REM Check user input
- if /i "%confirm%" neq "Y" (
- goto input
- exit /b 1
- )
- REM Process files in the current directory
- for %%f in (*.DNG *.dng) do (
- exiftool -DefaultScale="!squeeze_factor! 1.0" -overwrite_original "%%f"
- )
- REM Print confirmation message
- echo.
- echo Processing complete
- echo DNG's EXIF rewritten with a !squeeze_factor! Squeeze factor
- pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement