Page 1 of 1

Error with gif output: This picture cannot be written u.....

Posted: Thu Feb 02, 2012 1:53 pm
by johny
Hello,

I'm trying to convert eps files to gif.

This command was generated from XNVIEW (export function for .XBS script files)

Code: Select all

nconvert -npcd 2 -size 256x256+0 -ctype grey -corder inter -out gif -ratio -rtype lanczos -rflag orient -resize 190 0 -bgcolor 255 255 255 -canvas 210 0 center -o output\blabla.gif C:\temp\logos\abc.eps
The error is:
"This picture cannot be written using this format"

I already look for the problem in this forum, but the one posted there doesn't works.

Thanks a lot for advices or even better: "solutions"

Thanks,
johny

Re: Error with gif output: This picture cannot be written u.

Posted: Fri Feb 03, 2012 9:04 am
by xnview
Please add -colors 256

Re: Error with gif output: This picture cannot be written u.

Posted: Fri Feb 03, 2012 10:33 am
by johny
Hello and thanks a lot for your reply.

Q1: Should i have know this? (in wich case i will have to invest more time to read the complete documentation of nconvert)
Or is some code missing (or a bug) in the "export to .BAT" feature?

Q2:
This only works if i place -colors 256 at the end of my command line but not if i place it after the -out gif option, wich should be either a bug, or documented somewhere. By reading the output of nconvert.exe -help, i understand there are options of type "Options" and options of type "Process", but they are already correctly grouped and ordered in my command, so this is not the problem.

This works:

Code: Select all

nconvert -npcd 2 -size 256x256+0 -ctype grey -corder inter -out gif -ratio -rtype lanczos -rflag orient -resize 190 0 -bgcolor 255 255 255 -canvas 210 0 center -colors 256 -o output\blabla.gif C:\temp\logos\abc.eps
This doesn't works:

Code: Select all

nconvert -npcd 2 -size 256x256+0 -ctype grey -corder inter -out gif -colors 256 -ratio -rtype lanczos -rflag orient -resize 190 0 -bgcolor 255 255 255 -canvas 210 0 center -o output\blabla.gif C:\temp\logos\abc.eps
Q3:
I have a big quality difference beetween xbs file with xnview and the above nconvert command. I just can't use nconvert that way. What can i do? Is there a way to get the same quality?

I hope all these input will help you in your job, and that i will also find a solution.
Thanks a lot for your job.

ps: i'm also developper of softwares, and appreciate your work.

Re: Error with gif output: This picture cannot be written u.

Posted: Fri Feb 03, 2012 2:02 pm
by xnview
johny wrote:Hello and thanks a lot for your reply.

Q1: Should i have know this? (in wich case i will have to invest more time to read the complete documentation of xnconvert)
Or is some code missing (or a bug) in the "export to .BAT" feature?
Ok, it's a bug
Q2:
This only works if i place -colors 256 at the end of my command line but not if i place it after the -out gif option, wich should be either a bug, or documented somewhere. By reading the output of nconvert.exe -help, i understand there are options of type "Options" and options of type "Process", but they are already correctly grouped and ordered in my command, so this is not the problem.

This works:

Code: Select all

nconvert -npcd 2 -size 256x256+0 -ctype grey -corder inter -out gif -ratio -rtype lanczos -rflag orient -resize 190 0 -bgcolor 255 255 255 -canvas 210 0 center -colors 256 -o output\blabla.gif C:\temp\logos\abc.eps
This doesn't works:

Code: Select all

nconvert -npcd 2 -size 256x256+0 -ctype grey -corder inter -out gif -colors 256 -ratio -rtype lanczos -rflag orient -resize 190 0 -bgcolor 255 255 255 -canvas 210 0 center -o output\blabla.gif C:\temp\logos\abc.eps
-resize always convert picture into RGB, so the 256 reduction must be done after...
Q3:
I have a big quality difference beetween xbs file with xnview and the above nconvert command. I just can't use xnconvert that way. What can i do? Is there a way to get the same quality?
You means that the bat created by XnView has better output than the XnConvert one?

Re: Error with gif output: This picture cannot be written u.

Posted: Fri Feb 03, 2012 2:30 pm
by johny
Hello,

I'm sorry, but each time i said xnconvert, i meant in fact nconvert.

So, yes, that's my only problem now: xnview produces a much better quality than the nconvert generated command line.

Good quality with xnview:
http://img843.imageshack.us/img843/3189/goodp.gif

Bad quality with the nconvert command line generated by xnview:
http://img69.imageshack.us/img69/5880/bado.gif

I use nconvert 6.00 64 bits
Probably it's not a problem a problem with some missing parameters on the command line, but with nconvert itself ?

Thanks,

Re: Error with gif output: This picture cannot be written u.

Posted: Mon Feb 06, 2012 6:07 pm
by xnview
Strange, could you send me the xbs used in XnView, and the original file, please?

Re: Error with gif output: This picture cannot be written u.

Posted: Mon Feb 06, 2012 6:43 pm
by johny
Hello Pierre,

Yes, absolutely,
Where can i find your email?
Or i may use any alternative way you propose me. It doesn't seems that the forum is the proper tool to send a file...

Re: Error with gif output: This picture cannot be written u.

Posted: Mon Feb 06, 2012 7:43 pm
by xnview
contact at xnview dot com

Re: Error with gif output: This picture cannot be written u.

Posted: Wed Feb 08, 2012 7:19 pm
by johny
I finaly solved my problem by using the two parameters:
-colors 256
and:
-dpi 300

The results are now great.

The final command line is:
nconvert -npcd 2 -size 256x256+0 -ctype grey -corder inter -out gif -ratio -rtype lanczos -rflag orient -resize 190 0 -bgcolor 255 255 255 -dpi 300 -canvas 210 0 center -colors 256 -o output\blabla.gif C:\temp\logos\abc.eps

One others quality problem i had was that nconvert uses ghostscript for eps/ps/pdf, and i had ghostscript 32 bits installed on my machine, but with nconvert 64 bits !
So, if you have Ghostscript on your machine, always sure that you use the according version of Ghostscript. For example:
* nconvert 32 bits and Ghostscript 32 bits
* nconvert 64 bits and Ghostscript 64 bits

Thanks a lot for the help,
johny