Page 1 of 1

jpg - bad output format?

Posted: Wed Mar 18, 2009 7:24 pm
by BabaG
i ran the same command using a variable for the file extension and
all of the formats i tried worked fine with the exception of anything
jpg. tried bmp, cin, dpx, png, ppm, tga, tiff, maybe something else
but i can't remember now. all worked fine, ecept jp2, jpc, jpg all
returned the error 'bad output format.'

is there additional syntax that must be used for these formats?

(the version of nconvert is slightly older, not quite the current.)

thanks,
BabaG

Re: jpg - bad output format?

Posted: Thu Mar 19, 2009 3:17 pm
by xnview
You use

Code: Select all

-out jpg
?

Re: jpg - bad output format?

Posted: Thu Mar 19, 2009 9:34 pm
by BabaG
thanks pierre.

here's a snip from my command. the variable 'outformat' carries the 'jpg' value, as you've suggested.
as i said in the original post, this line works for all of the formats i use except for jpg and jpg related
formats.

"/usr/bin/nconvert -quiet -out " + outformat + " -high_res -raw_camerabalance -negate -levels " + scorrLvlToe + " " + scorrLvlShd + " -brightness " + scorrBri + " -contrast " + scorrCon + " -gamma " + scorrGam + " -balance " + scorrRed + " " + scorrGrn + " " + scorrBlu + " -hls " + scorrHue + " " + scorrLtn + " " + scorrSat + " -crop " + sCropX + " " + sCropY + " " + sCropW + " " + sCropH + " -bgcolor 0 0 0 -canvas " + sCanvasW + " " + sCanvasH + " " + CanvasPos + " -resize " + sResizeW + " " + sResizeH + " -o " + pdestination + "/" + fname + " " + receiving + "/" + tmp_pre_A + leadzero + frame_num_string + "." + capformat

the variables in use here are:

outformat = jpg in this case
scorrLvlToe = toe value of levels correction
scorrLvlShd = shoulder value of levels correction
scorrBri = brightness value correction
scorrCon = contrast value correction
scorrGam = gamma value correction
scorrRed = red value correction
scorrGrn = green value correction
scorrBlu = blue value correction
scorrHue = hue value correction
scorrLtn = lightness value correction
scorrSat = saturation value correction
sCropX = crop x position value
sCropY = crop y position value
sCropW = crop width
sCropH = crop height
sCanvasW = canvas width
sCanvasH = canvas height
CanvasPos = canvas position
sResizeW = resize width
sResizeH = resize height
pdestination = processed frame destination folder
fname = filename for processed frame
receiving = folder where nconvert finds the original frame
tmp_pre_A = first part of filename
leadzero = any leading zeroes in the original frame's filename
frame_num_string = frame number of original frame's filename
capformat = capture format (cr2, nef, jpg, etc.) of original frame

thanks and hope this helps track this down,
BabaG

Re: jpg - bad output format?

Posted: Fri Mar 20, 2009 7:20 am
by xnview
For jpeg, it's '-out jpeg'

Re: jpg - bad output format?

Posted: Fri Mar 20, 2009 6:39 pm
by BabaG
unless it conflicts with something in the programming, it would be
convenient on this end if the parameters for the -out command
matched the extension for the filetype.

and, btw, that was indeed the problem. changed -out jpg to -out jpeg
and everything works fine now.

thanks,
BabaG

Re: jpg - bad output format?

Posted: Fri May 22, 2009 7:11 pm
by helmut
BabaG wrote:unless it conflicts with something in the programming, it would be
convenient on this end if the parameters for the -out command
matched the extension for the filetype.
Supporting both jpg and jpeg as output format is a good idea. Also, the error message of nconvert should improved. E.g. instead of "Bad output format" the wording "Invalid output format". Would be clearer.

Message numbers
Also, each message should have a unique message number. Then, people can search the forum/help for that message number and find help easier.