Preserve background color ?
Moderators: helmut, XnTriq, xnview
Preserve background color ?
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 !
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 ?
No sorry, it's ghostscriptBingo 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 ?
Pierre.
I tried, but white is not white.xnview wrote:Try, if you have a lot of white, white will be whiteBingo 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 ?
I really have a lot of white though ! I'd say around 95% maybe.
Could you send me the PNG 16m?Bingo wrote:I tried, but white is not white.xnview wrote:Try, if you have a lot of white, white will be whiteBingo 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 ?
I really have a lot of white though ! I'd say around 95% maybe.
Pierre.
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
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
But with the -dither, all is ok, no?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!!!).
Pierre.
Yes, right. There is a problem because when i quantize picture, i reduce bits per component, so after white is no more whiteBingo wrote:Yes, but the output is... dithered !xnview wrote:But with the -dither, all is ok, no?
I do not want dithering in the output images, I need plain colors.

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