Advertisement
ElReddo

Anamorphic DeSqueeze Tool - WINDOWS - Rupert Warries

Dec 24th, 2024 (edited)
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 2.05 KB | Software | 0 0
  1. @echo off
  2. REM Enable Delayed Expansion
  3. setlocal enabledelayedexpansion
  4.  
  5. REM Change to the directory where the script is located
  6. cd /d "%~dp0"
  7.  
  8. REM Clear the terminal screen
  9. cls
  10.  
  11. REM Tool Intro Text
  12. echo Anamorphic DNG EXIF DeSqueeze for Exiftool - written by Rupert Warries for Windows
  13. echo.
  14. echo ------------
  15. echo.
  16. 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).
  17. echo.
  18. echo USAGE INSTRUCTION :
  19. echo 1. Place this script inside the folder containing the DNG images for processing
  20. echo 2. Drag tool into a terminal window to run and follow the prompts
  21. echo 3. DNG filenames must contain no spaces - run the tool by dragging into a terminal window and following the prompts
  22. echo 4. An installation of Exiftool must be present for this script to operate
  23. echo.
  24. echo ------------
  25. echo.
  26.  
  27. REM Show the directory and ask for confirmation
  28. echo All DNG files present will be de-squeezed in the following directory:
  29. echo %cd%
  30. set /p confirm=Do you want to continue? (Y/N):
  31.  
  32. REM Check user input
  33. if /i "%confirm%" neq "Y" (
  34.   echo Processing cancelled.
  35.   exit /b 1
  36. )
  37.  
  38. REM Ask for Squeeze factor and Loop until a valid number is entered
  39. :input
  40. 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):
  41.  
  42. REM Show the entered value and ask for confirmation
  43. echo Is the input formatted to one or more decimal places? (e.g. 1.0 or 1.33 - other values could damage the DNG):
  44. echo %squeeze_factor%
  45. set /p confirm=Confirm the input is formatted correctly? (Y/N):
  46.  
  47. REM Check user input
  48. if /i "%confirm%" neq "Y" (
  49.   goto input
  50.   exit /b 1
  51. )
  52.  
  53. REM Process files in the current directory
  54. for %%f in (*.DNG *.dng) do (
  55.   exiftool -DefaultScale="!squeeze_factor! 1.0" -overwrite_original "%%f"
  56. )
  57.  
  58. REM Print confirmation message
  59. echo.
  60. echo Processing complete
  61. echo DNG's EXIF rewritten with a !squeeze_factor! Squeeze factor
  62. pause
  63.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement