Page 1 of 1
Problem with a *.pgm image
Posted: Sat Jan 28, 2023 4:55 pm
by herb
Hello Pierre,
On my Windows 10 system I work with Nconvert version 7.136 to convert images to *.jpg images.
Using only Ascii characters inside the filename I have seen the following problem with *pgm images:
I use the following command
Code: Select all
nconvert.exe -half_res -ignore_errors -thumb 1920 1920 -overwrite -out jpeg -o OUTPUTFILENAME-without-extension SOURCEFILE
In case of SOURCEFILE is a *.pgm image (or maybe another filetype) the outputfile is created without file-extension ".jpg".
Best regards
herb
Re: Problem with a *.pgm image
Posted: Sun Jan 29, 2023 8:49 am
by xnview
i can't reproduce, i've tried
Code: Select all
nconvert -out jpeg -o c:\output\test file.pgm
Re: Problem with a *.pgm image
Posted: Sun Jan 29, 2023 9:44 am
by herb
Hello Pierre,
thanks for your investigations.
I have to say sorry, because I did a big mistake.
The problem does not typically occur with *.pgm images.
Further tests showed that it occurs with all files that contain a dot "." in the filename: e.g. test.ascii.pgm
Code: Select all
nconvert.exe -half_res -ignore_errors -thumb 1920 1920 -overwrite -out jpeg -o test.ascii test.ascii.pgm
nconvert.exe -half_res -ignore_errors -thumb 1920 1920 -overwrite -out jpeg -o test.x test.x.psd
Both commands create output-files
without extension.jpg
Best regards
herb
Re: Problem with a *.pgm image
Posted: Fri Feb 03, 2023 10:15 am
by xnview
ok, i understand now. The problem when using -o is: do you want to have test.ascii as output filename or test.ascii.jpg, i can't know
Re: Problem with a *.pgm image
Posted: Fri Feb 03, 2023 12:08 pm
by herb
Hello Pierre,
I think that I now understand the logic used by NConvert:
- -out defines the type of image to be generated
In case of the filename
does not contain a dot - NConvert adds an extension which depends on filetype -out
In case of the filename
does contain a dot - NConvert handles it as a filename with extension
When I am right, nothing has to be changed.
Best regards
herb