Page 1 of 2
Preserve background color ?
Posted: Mon Mar 07, 2005 4:03 pm
by Bingo
Hi all !
I'd like to use nconvert to convert EPS files (with a transparent background by design) to PNGs (256 colors, indexed).
If I try :
nconvert -o my.png -out png -dpi 140 my.eps
it works fine : I get a nice png with a white background.
But if I try :
nconvert -o my.png -out png -dpi 140 -colors 256 my.eps
the resulting file has a bluish background color (248,252,249).
The original file is almost only tranparent with some lines and texts (it's a map, actually), and I really need to preserve a white background.
Is there a way to achieve this ?
Thanks for helping !
Re: Preserve background color ?
Posted: Mon Mar 07, 2005 4:10 pm
by xnview
Bingo wrote:Hi all !
I'd like to use nconvert to convert EPS files (with a transparent background by design) to PNGs (256 colors, indexed).
If I try :
nconvert -o my.png -out png -dpi 140 my.eps
it works fine : I get a nice png with a white background.
But if I try :
nconvert -o my.png -out png -dpi 140 -colors 256 my.eps
the resulting file has a bluish background color (248,252,249).
The original file is almost only tranparent with some lines and texts (it's a map, actually), and I really need to preserve a white background.
Is there a way to achieve this ?
No sorry, it's ghostscript
Posted: Mon Mar 07, 2005 4:12 pm
by Bingo
Okay.
Now if I convert to PNG (16m colors), and then reprocess the image to reduce colors to 256, can I keep my white... white ?
Posted: Mon Mar 07, 2005 5:50 pm
by xnview
Bingo wrote:Okay.
Now if I convert to PNG (16m colors), and then reprocess the image to reduce colors to 256, can I keep my white... white ?
Try, if you have a lot of white, white will be white
Posted: Mon Mar 07, 2005 6:32 pm
by Bingo
xnview wrote:Bingo wrote:Okay.
Now if I convert to PNG (16m colors), and then reprocess the image to reduce colors to 256, can I keep my white... white ?
Try, if you have a lot of white, white will be white
I tried, but white is not white.
I really have a lot of white though ! I'd say around 95% maybe.
Posted: Mon Mar 07, 2005 7:12 pm
by xnview
Bingo wrote:xnview wrote:Bingo wrote:Okay.
Now if I convert to PNG (16m colors), and then reprocess the image to reduce colors to 256, can I keep my white... white ?
Try, if you have a lot of white, white will be white
I tried, but white is not white.
I really have a lot of white though ! I'd say around 95% maybe.
Could you send me the PNG 16m?
Posted: Mon Mar 07, 2005 9:08 pm
by Bingo
Of course.
I'll send it to you tomorrow morning.
Posted: Tue Mar 08, 2005 10:13 am
by Bingo
OK, pm sent with link to the image.
Thanks for helping Pierre.
Posted: Mon Mar 21, 2005 9:57 am
by Bingo
Pierre,
Have you found something new about this matter ?
Arnaud
Posted: Mon Mar 21, 2005 9:59 am
by xnview
Bingo wrote:Have you found something new about this matter ?
Do you have received my reply by pm?
Posted: Mon Mar 21, 2005 10:30 am
by Bingo
xnview wrote:Do you have received my reply by pm?
Yes I have.
You noticed that their was no problem when "-dither" was used, but I was wondering whether you had found a solution for non-dithered conversions ?
Best regards,
Arnaud
Posted: Thu Mar 24, 2005 9:30 am
by Bingo
Pierre,
Are you planning on releasing a new build of nconvert ?
I am still in a test period, but I have to write batch jobs, and I would have liked to know whether I could write nconvert command lines, or if I had to write them using mogrify (which works but is horribly slow!!!).
Best regards,
Arnaud
Posted: Fri Apr 01, 2005 9:10 am
by xnview
Bingo wrote:Are you planning on releasing a new build of nconvert ?
I am still in a test period, but I have to write batch jobs, and I would have liked to know whether I could write nconvert command lines, or if I had to write them using mogrify (which works but is horribly slow!!!).
But with the -dither, all is ok, no?
Posted: Fri Apr 01, 2005 9:14 am
by Bingo
xnview wrote:But with the -dither, all is ok, no?
Yes, but the output is... dithered !
I do not want dithering in the output images, I need plain colors.
Posted: Fri Apr 01, 2005 3:14 pm
by xnview
Bingo wrote:xnview wrote:But with the -dither, all is ok, no?
Yes, but the output is... dithered !
I do not want dithering in the output images, I need plain colors.
Yes, right. There is a problem because when i quantize picture, i reduce bits per component, so after white is no more white

You can try with other software, you'll have same result.
But do you have same result with ImageMagick?