ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Change color of EPS file.
@ 2012-09-12 17:10 pol stra
  2012-09-13 11:09 ` Hans Hagen
  0 siblings, 1 reply; 15+ messages in thread
From: pol stra @ 2012-09-12 17:10 UTC (permalink / raw)
  To: conteXt mail


[-- Attachment #1.1: Type: text/plain, Size: 441 bytes --]

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

 		 	   		  

[-- Attachment #1.2: Type: text/html, Size: 684 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Change color of EPS file.
  2012-09-12 17:10 Change color of EPS file pol stra
@ 2012-09-13 11:09 ` Hans Hagen
  2012-09-13 11:45   ` Sietse Brouwer
  0 siblings, 1 reply; 15+ messages in thread
From: Hans Hagen @ 2012-09-13 11:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: pol stra

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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Change color of EPS file.
  2012-09-13 11:09 ` Hans Hagen
@ 2012-09-13 11:45   ` Sietse Brouwer
  2012-09-13 14:24     ` pol stra
  0 siblings, 1 reply; 15+ messages in thread
From: Sietse Brouwer @ 2012-09-13 11:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: pol stra

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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Change color of EPS file.
  2012-09-13 11:45   ` Sietse Brouwer
@ 2012-09-13 14:24     ` pol stra
  2012-09-13 16:07       ` Aditya Mahajan
  0 siblings, 1 reply; 15+ messages in thread
From: pol stra @ 2012-09-13 14:24 UTC (permalink / raw)
  To: Sietse Brouwer, conteXt mail


[-- Attachment #1.1: Type: text/plain, Size: 2178 bytes --]


> 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
 		 	   		  

[-- Attachment #1.2: Type: text/html, Size: 2671 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Change color of EPS file.
  2012-09-13 14:24     ` pol stra
@ 2012-09-13 16:07       ` Aditya Mahajan
  2012-09-13 16:18         ` Sietse Brouwer
  0 siblings, 1 reply; 15+ messages in thread
From: Aditya Mahajan @ 2012-09-13 16:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: TEXT/PLAIN, Size: 2173 bytes --]

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

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Change color of EPS file.
  2012-09-13 16:07       ` Aditya Mahajan
@ 2012-09-13 16:18         ` Sietse Brouwer
  0 siblings, 0 replies; 15+ messages in thread
From: Sietse Brouwer @ 2012-09-13 16:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Aditya Mahajan <adityam@umich.edu> wrote:
> 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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Change color of EPS file.
  2012-09-15 13:24               ` Troy Henderson
@ 2012-09-16  8:03                 ` Henning Hraban Ramm
  0 siblings, 0 replies; 15+ messages in thread
From: Henning Hraban Ramm @ 2012-09-16  8:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users

2012/9/15 Troy Henderson <thenders@gmail.com>:
> Utilities are available in abundance which can transform raster graphics
> from color to grayscale, but until I created this yesterday, I have never
> seen a utility that keeps the graphic in vector format (i.e., never
> rasterizes it throughout the conversion) and converts it from color to
> grayscale.  Until I read this thread, I guess I thought I was the only one
> that desired such a tool.  I'm glad to see that at least I'm not alone.

Oh, there are, but I know only commercial (e.g. OneVision Asura) or
in-house solutions (like what I "managed" at a newspaper several years
ago).
The simple (or simplistic) rgbcolor patch doesn't work with
complicated EPS, of course. But then you'd need to know the structure
of your EPS. It's hard to get that right for arbitrary EPS. And there
aren't that many able PostScript programmers left.
E.g. at that newspaper we were able to switch spot colors just before
plate exposition; the trick was to use a generic spot color name
throughout the workflow and to change its definition in the completed
page EPS. (At that time "our" printing press was too small to print
all pages in full color.)

Since PostScript is a full programming language, most PS generators
use shortcuts (macros/functions) that wrap the originally simple
commands, so you often can't track down where the structure hides that
you'd like to change. Best solution is often to do a full "expansion"
with a PS interpreter and write a new, better readable, but mostly
much bigger code. pstoedit is your friend for that – e.g. Hans did
some nice tricks with EPS pictures converted to MetaPost.

I once experimented a bit with changing colors of embedded bitmap
images – it's rather easy to do, but never looks right without a deep
understanding of color management and its strange implementation in
PostScript...

Greetlings, Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Change color of EPS file.
  2012-09-15 12:22             ` Rogers, Michael K
@ 2012-09-15 13:24               ` Troy Henderson
  2012-09-16  8:03                 ` Henning Hraban Ramm
  0 siblings, 1 reply; 15+ messages in thread
From: Troy Henderson @ 2012-09-15 13:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 951 bytes --]

Whether the filter is "simple" or "simplistic", it is odd that such a
filter has not been abundantly available before.  I often wondered years
ago when I first started to understand the difference between raster and
vector graphics why something so simple (or simplistic) could not be easily
done.  It was also strange to me that I couldn't easily create a TeX
document with one set of graphics and have TeX generate two types of
output, namely color and a grayscale, depending on the value of some
parameters.

Utilities are available in abundance which can transform raster graphics
from color to grayscale, but until I created this yesterday, I have never
seen a utility that keeps the graphic in vector format (i.e., never
rasterizes it throughout the conversion) and converts it from color to
grayscale.  Until I read this thread, I guess I thought I was the only one
that desired such a tool.  I'm glad to see that at least I'm not alone.

Troy

[-- Attachment #1.2: Type: text/html, Size: 1004 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Change color of EPS file.
  2012-09-15  5:36           ` luigi scarso
@ 2012-09-15 12:22             ` Rogers, Michael K
  2012-09-15 13:24               ` Troy Henderson
  0 siblings, 1 reply; 15+ messages in thread
From: Rogers, Michael K @ 2012-09-15 12:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1258 bytes --]


On Sep 15, 2012, at 1:36 AM, luigi scarso <luigi.scarso@gmail.com<mailto:luigi.scarso@gmail.com>>
 wrote:
On Sat, Sep 15, 2012 at 1:23 AM, Troy Henderson <thenders@gmail.com<mailto:thenders@gmail.com>> wrote:

and which uses Cairo and Poppler for its conversion.  Now in order for my simplistic filter to function,
Why 'simplistic' and not 'simple'  ?
I always thought that its meaning is negative (something like " 'simplistic' is a bad imitation of 'simple' ")

That's often true.  Here I think the intention is to imply that the filter is simple and naive, perhaps not robust, might not work for everybody, etc.  In that sense, the meaning does have a negative connotation.

________________________________

This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).

[-- Attachment #1.2: Type: text/html, Size: 1878 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Change color of EPS file.
  2012-09-14 23:23         ` Troy Henderson
@ 2012-09-15  5:36           ` luigi scarso
  2012-09-15 12:22             ` Rogers, Michael K
  0 siblings, 1 reply; 15+ messages in thread
From: luigi scarso @ 2012-09-15  5:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 347 bytes --]

On Sat, Sep 15, 2012 at 1:23 AM, Troy Henderson <thenders@gmail.com> wrote:

>
> and which uses Cairo and Poppler for its conversion.  Now in order for my
> simplistic filter to function,

Why 'simplistic' and not 'simple'  ?
I always thought that its meaning is negative (something like "
'simplistic' is a bad imitation of 'simple' ")
-- 
luigi

[-- Attachment #1.2: Type: text/html, Size: 665 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Change color of EPS file.
  2012-09-14 22:48       ` Aditya Mahajan
@ 2012-09-14 23:23         ` Troy Henderson
  2012-09-15  5:36           ` luigi scarso
  0 siblings, 1 reply; 15+ messages in thread
From: Troy Henderson @ 2012-09-14 23:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 829 bytes --]

For those that care, here is basically how the service works.  The filter
is applied to an SVG, and the uploaded graphic is converted to SVG using
the following process:

EPS -> PDF -> SVG
PDF -> SVG
SVG -> PDF -> SVG

where the EPS -> PDF conversion is done with the standard `epstopdf`
included with TeX.  The PDF -> SVG conversion is done with `pdf2svg` which
is available from

http://www.cityinthesky.co.uk/opensource/pdf2svg

and which uses Cairo and Poppler for its conversion.  Now in order for my
simplistic filter to function, all SVG's must essentially "look alike"
(i.e., come from the same source).  Therefore, uploaded SVG's are converted
to PDF (using Inkscape) and then back to SVG (using `pdf2svg`).  The filter
then works with the resulting SVG and converts it back to the uploaded
format using Inkscape.

Troy

[-- Attachment #1.2: Type: text/html, Size: 978 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Change color of EPS file.
  2012-09-14 22:29     ` Troy Henderson
@ 2012-09-14 22:48       ` Aditya Mahajan
  2012-09-14 23:23         ` Troy Henderson
  0 siblings, 1 reply; 15+ messages in thread
From: Aditya Mahajan @ 2012-09-14 22:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, 14 Sep 2012, Troy Henderson wrote:

> I put together this little utility for converting a color EPS/PDF/SVG to
> grayscale.
>
> http://www.tlhiv.org/grayscale/
>
> Selecting "invert" swaps colors from white to black and black to white.
> So, using a black/white graphic on a transparent background should
> transform it to a white/black graphic on a transparent background.
>
> Testing is certainly necessary.

Interesting. At some stage I might revive the webfilter branch of the 
filler module so that such services can be accessed from within ConTeXt.

See the following post for details: 
http://randomdeterminism.wordpress.com/2010/08/12/using-filters-outside-the-box/

In case anyone is interested, this blog post was talking about code 
available at

https://raw.github.com/adityam/filter/web/t-filter.tex
https://raw.github.com/adityam/filter/web/t-filter.lua

At some stage I decided to delete these features from the filter module 
and move it to a separate module. The code is available at

https://github.com/adityam/context-webfilter

but I haven't used it for about 2 years, and given all the changes in the 
internal namespace, I doubt it will run without modifications. 
Nonetheless, the idea is that a user can use such services using:

\definewebfilter[grayscaleimage]
                 [prefix={http://www.tlhiv.org/grayscale},
                  method=POST,
                  ... some other options ....
                 ]

and then use

\grayscaleimage{local-image.eps}

This will call the web-service and cache the result.

Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Change color of EPS file.
  2012-09-14 14:34   ` Troy Henderson
@ 2012-09-14 22:29     ` Troy Henderson
  2012-09-14 22:48       ` Aditya Mahajan
  0 siblings, 1 reply; 15+ messages in thread
From: Troy Henderson @ 2012-09-14 22:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 363 bytes --]

I put together this little utility for converting a color EPS/PDF/SVG to
grayscale.

http://www.tlhiv.org/grayscale/

Selecting "invert" swaps colors from white to black and black to white.
So, using a black/white graphic on a transparent background should
transform it to a white/black graphic on a transparent background.

Testing is certainly necessary.

Troy

[-- Attachment #1.2: Type: text/html, Size: 451 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Change color of EPS file.
  2012-09-14 14:22 ` pol stra
@ 2012-09-14 14:34   ` Troy Henderson
  2012-09-14 22:29     ` Troy Henderson
  0 siblings, 1 reply; 15+ messages in thread
From: Troy Henderson @ 2012-09-14 14:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 491 bytes --]

I tested this on a black-on-transparent EPS that was created via MetaPost,
and it seems to work fine.  If you are not using Linux (or Unix or Mac OS
X), let me know and I can probably put together a quick HTML page to do
this on my server.

> cat foo.eps | sed -e "s/0 0 0 setrgbcolor/1 1 1 setrgbcolor/g" > bar.eps

It simply translates the (0,0,0) triplet (which is black) to the (1,1,1)
triplet (which is white).  This is very simplistic and may not do all that
you want.

Troy Henderson

[-- Attachment #1.2: Type: text/html, Size: 534 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Change color of EPS file.
       [not found] <mailman.62.1347553130.2084.ntg-context@ntg.nl>
@ 2012-09-14 14:22 ` pol stra
  2012-09-14 14:34   ` Troy Henderson
  0 siblings, 1 reply; 15+ messages in thread
From: pol stra @ 2012-09-14 14:22 UTC (permalink / raw)
  To: conteXt mail


[-- Attachment #1.1: Type: text/plain, Size: 624 bytes --]

>Aditya Mahajan <adityam@umich.edu> wrote:
>> 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.
 
That is exactly what I wanted.

>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.
 
Thank you

>Cheerio,
>Sietse
 
 		 	   		  

[-- Attachment #1.2: Type: text/html, Size: 981 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2012-09-16  8:03 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-12 17:10 Change color of EPS file pol stra
2012-09-13 11:09 ` Hans Hagen
2012-09-13 11:45   ` Sietse Brouwer
2012-09-13 14:24     ` pol stra
2012-09-13 16:07       ` Aditya Mahajan
2012-09-13 16:18         ` Sietse Brouwer
     [not found] <mailman.62.1347553130.2084.ntg-context@ntg.nl>
2012-09-14 14:22 ` pol stra
2012-09-14 14:34   ` Troy Henderson
2012-09-14 22:29     ` Troy Henderson
2012-09-14 22:48       ` Aditya Mahajan
2012-09-14 23:23         ` Troy Henderson
2012-09-15  5:36           ` luigi scarso
2012-09-15 12:22             ` Rogers, Michael K
2012-09-15 13:24               ` Troy Henderson
2012-09-16  8:03                 ` Henning Hraban Ramm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).