# Convert a RAW file to a 16bit TIFF param ( [string]$name, [string]$dir, [string]$file, [int]$width, [int]$height, [int]$i, [int]$n ) <# -name name -file file -dir dir -width PictureWidth -height PictureHeight -i sequence number -n number of files Example: -name c:\picture_folder\picture.jpg -file picture.jpg -dir c:\picture_folder\ -width 1024 -height 768 -i 1 -n 4 #> <# The Adobe DNG Converter supports the following command line options: -c Output compressed DNG files (default). -u Output uncompressed DNG files. -l Output linear DNG files. -e Embed original raw file inside DNG files. -p0 Set JPEG preview size to none. -p1 Set JPEG preview size to medium size (default). -p2 Set JPEG preview size to full size. -cr2.4 Set Camera Raw compatibility to 2.4 and later -cr4.1 Set Camera Raw compatibility to 4.1 and later -cr4.6 Set Camera Raw compatibility to 4.6 and later -cr5.4 Set Camera Raw compatibility to 5.4 and later -dng1.1 Set DNG backward version to 1.1 -dng1.3 Set DNG backward version to 1.3 -d Output converted files to the specified directory. Default is the same directory as the input file. -o Specify the name of the output DNG file. Default is the name of the input file with the extension changed to “.dng”. #> # convert to DNG first $dng = Join-Path $dir (([io.fileinfo]$file).basename + ".dng") "Konvertieren von '{0}' nach '{1}'" -f $name, $dng & "C:\Program Files (x86)\Adobe\Adobe DNG Converter.exe" -c -p2 $name | Out-Null # | Out-Null is to wait until finished # convert the DNG to TIFF $tiff = Join-Path $dir (([io.fileinfo]$file).basename + ".tiff") "Konvertieren von '{0}' nach '{1}'" -f $dng, $tiff & "C:\Program Files (x86)\ImageMagick-6.8.8-Q16\convert" ("dng:"+$dng) $tiff | Out-Null # remove the temp DNG file Remove-Item $dng # run your image app on the converted TIFF & "C:\Program Files\Nikon\Capture NX 2\Capture NX 2.exe" $tiff <# Write-Host "Press any key to continue ..." [void]$host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") #>