Hi all!
I'm using nconvert in a .bat file. Works fine until it's time to convert GIF to JPG using rflag decr, this returns an error. When I remove rflag decr it works ok.
Note: rflag decr does work correctly with other formats I've tested.
So, is this not supported for GIFs? Would be really nice to use it for small images otherwise they will be upsized which sucks. Any ideas?
Great peice of software I can't thank you, the creators, enough!
GIF to JPG using rflag decr fails
Moderators: XnTriq, helmut, xnview
Re: GIF to JPG using rflag decr fails
Could you post the command line used?eriksson wrote:Hi all!
I'm using nconvert in a .bat file. Works fine until it's time to convert GIF to JPG using rflag decr, this returns an error. When I remove rflag decr it works ok.
Note: rflag decr does work correctly with other formats I've tested.
So, is this not supported for GIFs? Would be really nice to use it for small images otherwise they will be upsized which sucks. Any ideas?
Great peice of software I can't thank you, the creators, enough!
Pierre.
Re: GIF to JPG using rflag decr fails
Because I had a problem with GIFs I extended my script, hopefully I will only need one line of code after you replyxnview wrote:Could you post the command line used?
For GIF:
Code: Select all
nconvert -quiet -out jpeg -o %nr%.jpg -D -npcd 2 -size 256x256+0 -ctype rgb -ratio -rtype lanczos -resize 640 480 source_%nr%%ext%
Code: Select all
nconvert -quiet -out jpeg -o %nr%.jpg -D -npcd 2 -size 256x256+0 -ctype rgb -ratio -rflag decr -rtype lanczos -resize 640 480 -q 80 -sharpen 40 source_%nr%%ext%
Cheers!
Re: GIF to JPG using rflag decr fails
Ok, you must add -truecolorseriksson wrote:Because I had a problem with GIFs I extended my script, hopefully I will only need one line of code after you replyxnview wrote:Could you post the command line used?
For GIF:For others:Code: Select all
nconvert -quiet -out jpeg -o %nr%.jpg -D -npcd 2 -size 256x256+0 -ctype rgb -ratio -rtype lanczos -resize 640 480 source_%nr%%ext%
If -rflag decr is included in the GIF code it failsCode: Select all
nconvert -quiet -out jpeg -o %nr%.jpg -D -npcd 2 -size 256x256+0 -ctype rgb -ratio -rflag decr -rtype lanczos -resize 640 480 -q 80 -sharpen 40 source_%nr%%ext%
Cheers!
Pierre.
Re: GIF to JPG using rflag decr fails
Thanks that did it!xnview wrote:Ok, you must add -truecolors
I was just about to mention that -transparent 100 doesn't work but then I remembered that I'm converting GIF to JPG
I would have converted my GIFs to PNGs to preserve transparency but I need my images to end in .jpg for my "show random image" javascript to work.
Although if I did want to use GIFs/PNGs in my slideshow using javascript I suppose I could check each time an image loads that it did so correctly and if not (onError) then replace .jpg with .gif/.png.
But it's a slideshow so what am I doing caring about GIFs/PNGs anyway
Cheers xnview!