Crash when crop 16 bit TIFF files

Discussions on NConvert - the command line tool for image conversion and manipulation

Moderators: helmut, XnTriq, xnview

Post Reply
bigjoe
Posts: 1
Joined: Tue Jul 08, 2025 4:57 pm

Crash when crop 16 bit TIFF files

Post by bigjoe »

Hi,
I am happily using the last nconvert version to process some TIFF images developed from my camera. However I am encountering a blocking crash when i try to crop a 16-bit tiff file with this command line:

Code: Select all

nconvert.exe -quiet -org_depth -v -overwrite -out tiff -o a135700001361.tiff -icc_out AdobeRGB1998.icc -crop 2823 1972 2655 5333 -ratio -resize 2655 5333 -dpi 114 b_00678.tif
this is the verbose output:

Code: Select all

A TIFF (RGB) was recognized : b_00678.tif
    Width:11654 Height:8726 with 65536 colors
    Nplanes : 1      Bitscount : 16
    Bytes Per Plane : 69924
    xdpi : 300         ydpi : 300
Cropping :
And then the "The program has stopped working..." window shows up.

If I open the Visual Studio for debugging as suggested by the modal window -after discarding a couple of error messages- all I can read is this exception:

Code: Select all

'nconvert.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. 
'nconvert.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. 
'nconvert.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. 
'nconvert.exe' (Win32): Loaded 'C:\Windows\System32\apphelp.dll'. 
'nconvert.exe' (Win32): Loaded 'C:\Windows\System32\AcLayers.dll'. 
'nconvert.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'. 
'nconvert.exe' (Win32): Loaded 'C:\Windows\System32\shlwapi.dll'. 
'nconvert.exe' (Win32): Loaded 'C:\Windows\System32\SortWindows61.dll'. 
'nconvert.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'. 
'nconvert.exe' (Win32): Loaded 'C:\Windows\System32\win32u.dll'. 
'nconvert.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'. 
'nconvert.exe' (Win32): Loaded 'C:\Windows\System32\gdi32full.dll'. 
'nconvert.exe' (Win32): Loaded 'C:\Windows\System32\msvcp_win.dll'. 
'nconvert.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbase.dll'. 
'nconvert.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'. 
'nconvert.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'. 
'nconvert.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'. 
'nconvert.exe' (Win32): Loaded 'C:\Windows\System32\shell32.dll'. 
'nconvert.exe' (Win32): Loaded 'C:\Windows\System32\WinTypes.dll'. 
'nconvert.exe' (Win32): Loaded 'C:\Windows\System32\combase.dll'. 
'nconvert.exe' (Win32): Loaded 'C:\Windows\System32\vcomp140.dll'. 
'nconvert.exe' (Win32): Loaded 'C:\Windows\System32\imm32.dll'. 
The thread 0x1bb4 has exited with code 0 (0x0).
Unhandled exception at 0x00007FF64D27C2FB in nconvert.exe: 0xC0000005: Access violation writing location 0x0000022178E68000.

The program '[22996] nconvert.exe' has exited with code 0 (0x0).
if I skip the whole -crop command everything works fine... except it doesn't crop the image at all :wink:
If I skip the -org_depth parameter everything works fine except it writes a 8bit per channel TIFF losing colour information :(

Any suggestion/fixes?
Post Reply