Hello, I have a EPS file wich contains black lines and no background. The background of my presentation is colored, so I would like to put this figure in white. I tried a \startcolor … \stopcolor environement without succed. Is there a way to do so? In last resort I can put a white background with: \placefigure[left,none]{caption}{\externalfigure[demo-b][background=color,backgroundcolor=white]} Best regards
On 12-9-2012 19:10, pol stra wrote:
Hello,
I have a EPS file wich contains black lines and no background. The background of my presentation is colored, so I would like to put this figure in white. I tried a \startcolor … \stopcolor environement without succed.
Is there a way to do so?
edit the eps file ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hello Pol stra, Off-topic for this mailing list, but on-topic for you: You can do this with Inkscape. * Install Inkscape: http://inkscape.org/download/?lang=en * Open the EPS in Inkscape Working white-on-white sucks, so * File > Document properties > click to the right of 'Background:', below the Default units dropdown * Choose something nice and pastel-coloured with alpha (opacity) set to non-zero. * Select the object * Object > Ungroup (Ctrl+Shift+G) to make Inkscape see the individual paths, instead of a single EPS object The single rectangle selecting the object has now turned into a heap of rectangles. * With the colours at the bottom, set the fill to be red with click and/or set the stroke to be red with Shift+click This will probably not have the desired effect because some of the constituent paths will have black fill+transparent stroke, and with others it will be the other way round. So you'll have to set fill/stroke individually. * Select paths in turn, and set their fill/stroke as appropriate. Their respective values are shown in the bottom left. If you select multiple paths and their fill/stroke is different, it will be shown as "mixed"; when multiple paths' fills/strokes are not mixed they are identical, and you can change them all at once. (Depending on ... file-related things ... you may need to use Path > Object to Path at some point, and possibly Path > Break Apart. But probably not.) Good luck! --Sietse
From: sbbrouwer@gmail.com Date: Thu, 13 Sep 2012 13:45:20 +0200 Subject: Re: [NTG-context] Change color of EPS file. To: ntg-context@ntg.nl CC: ryzz@hotmail.fr
Hello Pol stra,
Off-topic for this mailing list, but on-topic for you: You can do this with Inkscape.
* Install Inkscape: http://inkscape.org/download/?lang=en * Open the EPS in Inkscape
Working white-on-white sucks, so * File > Document properties > click to the right of 'Background:', below the Default units dropdown * Choose something nice and pastel-coloured with alpha (opacity) set to non-zero.
* Select the object * Object > Ungroup (Ctrl+Shift+G) to make Inkscape see the individual paths, instead of a single EPS object The single rectangle selecting the object has now turned into a heap of rectangles. * With the colours at the bottom, set the fill to be red with click and/or set the stroke to be red with Shift+click
This will probably not have the desired effect because some of the constituent paths will have black fill+transparent stroke, and with others it will be the other way round. So you'll have to set fill/stroke individually.
* Select paths in turn, and set their fill/stroke as appropriate. Their respective values are shown in the bottom left. If you select multiple paths and their fill/stroke is different, it will be shown as "mixed"; when multiple paths' fills/strokes are not mixed they are identical, and you can change them all at once.
(Depending on ... file-related things ... you may need to use Path > Object to Path at some point, and possibly Path > Break Apart. But probably not.)
Good luck!
--Sietse
Thanks Sietse I already tried the inskape way, but it’s too much work if you have many files to proced. But your answer gave me the idea to use imegemagick, so I found this trick: convert -background none -density 300 -negate a1.EPS bbb.png I do not know why, but the same command with an EPS output gives me a white background so I had use a png file. The result is good enough for me. Thanks again
On Thu, 13 Sep 2012, pol stra wrote:
Off-topic for this mailing list, but on-topic for you: You can do this with Inkscape.
* Install Inkscape: http://inkscape.org/download/?lang=en * Open the EPS in Inkscape
Working white-on-white sucks, so * File > Document properties > click to the right of 'Background:', below the Default units dropdown * Choose something nice and pastel-coloured with alpha (opacity) set to non-zero.
* Select the object * Object > Ungroup (Ctrl+Shift+G) to make Inkscape see the individual paths, instead of a single EPS object The single rectangle selecting the object has now turned into a heap of rectangles. * With the colours at the bottom, set the fill to be red with click and/or set the stroke to be red with Shift+click
This will probably not have the desired effect because some of the constituent paths will have black fill+transparent stroke, and with others it will be the other way round. So you'll have to set fill/stroke individually.
* Select paths in turn, and set their fill/stroke as appropriate. Their respective values are shown in the bottom left. If you select multiple paths and their fill/stroke is different, it will be shown as "mixed"; when multiple paths' fills/strokes are not mixed they are identical, and you can change them all at once.
(Depending on ... file-related things ... you may need to use Path > Object to Path at some point, and possibly Path > Break Apart. But probably not.)
Good luck!
--Sietse
Thanks Sietse
I already tried the inskape way, but it’s too much work if you have many files to proced. But your answer gave me the idea to use imegemagick, so I found this trick: convert -background none -density 300 -negate a1.EPS bbb.png I do not know why, but the same command with an EPS output gives me a white background so I had use a png file. The result is good enough for me.
If you want to use eps images, why not just use a white background at ConTeXt end (as you had stated in your first message). Aditya
Aditya Mahajan
If you want to use eps images, why not just use a white background at ConTeXt end (as you had stated in your first message
I think you misread: Pol wants the EPS to be white-on-transparent, instead of black-on-transparent, so that he can use it on a (dark-)coloured background. Pol stra wrote:
But your answer gave me the idea to use imegemagick, so I found this trick: ... The result is good enough for me.
Congratulations. Good luck with your work. Cheerio, Sietse
participants (4)
-
Aditya Mahajan
-
Hans Hagen
-
pol stra
-
Sietse Brouwer