Re: SVGs with alpha channel transparency

2006-06-25 Thread John Pye
sam2p mentions that alpha channel and transparency supported only for 
Indexed images: only one color may be transparent

http://www.inf.bme.hu/~pts/sam2p/

This effectively means that sam2p does *not* support real alpha channel, 
since indexed images such as GIF support a single special color for 
complete (100%) transparency, as opposed to various 'cellophane' colors 
as permitted when a full alpha channel implementation is provided.


Cheers
JP

Jean-Pierre Chretien wrote:

Date: Wed, 21 Jun 2006 17:56:40 +0200 (MEST)
From: Jean-Pierre Chretien [EMAIL PROTECTED]
Subject: Re: SVGs with alpha channel transparency
To: lyx-users@lists.lyx.org


  

Date: Wed, 21 Jun 2006 09:57:10 +1000
From: John Pye [EMAIL PROTECTED]
To: Jean-Pierre Chretien [EMAIL PROTECTED]
CC: lyx-users@lists.lyx.org
Subject: Re: SVGs with alpha channel transparency

Hi Jean-Pierre,
  

[...]
  

A side conclusion of this thread (which was about svg export in general, not 
specific to transparency),
it came out that inkscape export could only provide transparency with bitmap output (png). 


Uwe pointed out that a recent version of inkscape provides a transparent pdf 
output.
  


Another pointer, borrowed from the TexLive mailing list:
http://www.inf.bme.hu/~pts/sam2p/

I read there that 
sam2p can create EPS and PDF images with transparency

Alas, sam2p starts from bitmaps, not from vector graphics...

  


--
John Pye
Department of Mechanical and Manufacturing Engineering
University of New South Wales, Sydney, Australia
http://pye.dyndns.org/



Re: SVGs with alpha channel transparency

2006-06-25 Thread John Pye
sam2p mentions that alpha channel and transparency supported only for 
Indexed images: only one color may be transparent

http://www.inf.bme.hu/~pts/sam2p/

This effectively means that sam2p does *not* support real alpha channel, 
since indexed images such as GIF support a single special color for 
complete (100%) transparency, as opposed to various 'cellophane' colors 
as permitted when a full alpha channel implementation is provided.


Cheers
JP

Jean-Pierre Chretien wrote:

Date: Wed, 21 Jun 2006 17:56:40 +0200 (MEST)
From: Jean-Pierre Chretien [EMAIL PROTECTED]
Subject: Re: SVGs with alpha channel transparency
To: lyx-users@lists.lyx.org


  

Date: Wed, 21 Jun 2006 09:57:10 +1000
From: John Pye [EMAIL PROTECTED]
To: Jean-Pierre Chretien [EMAIL PROTECTED]
CC: lyx-users@lists.lyx.org
Subject: Re: SVGs with alpha channel transparency

Hi Jean-Pierre,
  

[...]
  

A side conclusion of this thread (which was about svg export in general, not 
specific to transparency),
it came out that inkscape export could only provide transparency with bitmap output (png). 


Uwe pointed out that a recent version of inkscape provides a transparent pdf 
output.
  


Another pointer, borrowed from the TexLive mailing list:
http://www.inf.bme.hu/~pts/sam2p/

I read there that 
sam2p can create EPS and PDF images with transparency

Alas, sam2p starts from bitmaps, not from vector graphics...

  


--
John Pye
Department of Mechanical and Manufacturing Engineering
University of New South Wales, Sydney, Australia
http://pye.dyndns.org/



Re: SVGs with alpha channel transparency

2006-06-25 Thread John Pye
sam2p mentions that "alpha channel and transparency supported only for 
Indexed images: only one color may be transparent"

http://www.inf.bme.hu/~pts/sam2p/

This effectively means that sam2p does *not* support real alpha channel, 
since indexed images such as GIF support a single "special" color for 
complete (100%) transparency, as opposed to various 'cellophane' colors 
as permitted when a full alpha channel implementation is provided.


Cheers
JP

Jean-Pierre Chretien wrote:

Date: Wed, 21 Jun 2006 17:56:40 +0200 (MEST)
From: Jean-Pierre Chretien <[EMAIL PROTECTED]>
Subject: Re: SVGs with alpha channel transparency
To: lyx-users@lists.lyx.org


  

Date: Wed, 21 Jun 2006 09:57:10 +1000
From: John Pye <[EMAIL PROTECTED]>
To: Jean-Pierre Chretien <[EMAIL PROTECTED]>
CC: lyx-users@lists.lyx.org
Subject: Re: SVGs with alpha channel transparency

Hi Jean-Pierre,
  

[...]
  

A side conclusion of this thread (which was about svg export in general, not 
specific to transparency),
it came out that inkscape export could only provide transparency with bitmap output (png). 


Uwe pointed out that a recent version of inkscape provides a transparent pdf 
output.
  


Another pointer, borrowed from the TexLive mailing list:
http://www.inf.bme.hu/~pts/sam2p/

I read there that 
"sam2p can create EPS and PDF images with transparency"

Alas, sam2p starts from bitmaps, not from vector graphics...

  


--
John Pye
Department of Mechanical and Manufacturing Engineering
University of New South Wales, Sydney, Australia
http://pye.dyndns.org/



Re: SVGs with alpha channel transparency

2006-06-22 Thread Jean-Pierre Chretien

Date: Wed, 21 Jun 2006 17:56:40 +0200 (MEST)
From: Jean-Pierre Chretien [EMAIL PROTECTED]
Subject: Re: SVGs with alpha channel transparency
To: lyx-users@lists.lyx.org


Date: Wed, 21 Jun 2006 09:57:10 +1000
From: John Pye [EMAIL PROTECTED]
To: Jean-Pierre Chretien [EMAIL PROTECTED]
CC: lyx-users@lists.lyx.org
Subject: Re: SVGs with alpha channel transparency

Hi Jean-Pierre,
[...]
A side conclusion of this thread (which was about svg export in general, not 
specific to transparency),
it came out that inkscape export could only provide transparency with bitmap 
output (png). 

Uwe pointed out that a recent version of inkscape provides a transparent pdf 
output.

Another pointer, borrowed from the TexLive mailing list:
http://www.inf.bme.hu/~pts/sam2p/

I read there that 
sam2p can create EPS and PDF images with transparency
Alas, sam2p starts from bitmaps, not from vector graphics...

-- 
Jean-Pierre



Re: SVGs with alpha channel transparency

2006-06-22 Thread Helge Hafting

John Pye wrote:
Your approach defeats the purpose of using SVG in the first place, and 
will result in much large PDF files that I am currently getting. I 
really want to work out how use my SVG-with-alpha directly in LyX, or 
at least some vector format that will look OK.


I wonder if there's an SVG-to-EPS converter that doesn't something 
smart with regard to alpha channels? It would need to flatten the 
layers of the vector image in a vectorised way, rather than the 
bitmapped way that most renderers no double work.

If you're making a PDF, don't bother with EPS if you don't have to.
Can your SVG be converted to PDF directly?  pdflatex likes figures in
pdf format.  xfig drawings are treated this way already.

Helge Hafting


Re: SVGs with alpha channel transparency

2006-06-22 Thread Paul Smith

Could somebody please illustrate us about what is alpha-channel
transparency? I have searched for it through Google, but found
nothing instructive.

Paul


Re: SVGs with alpha channel transparency

2006-06-22 Thread Paul Smith

On 6/22/06, John Pye [EMAIL PROTECTED] wrote:

It's when you have 4 channels to describe each color: red, green, blue
and alpha. alpha is the opacity. If it's 1.0, then you color will show
up just as you expect. If it's zero you can see right through to
whatever's behind. Software that supports this needs to compose an image
for you by working out the combined color at each spot as the
combination of all the layers and their respective alpha values.

http://en.wikipedia.org/wiki/Alpha_channel


I understand now it. Thanks, John.

Paul


Re: SVGs with alpha channel transparency

2006-06-22 Thread Jean-Pierre Chretien

Date: Wed, 21 Jun 2006 17:56:40 +0200 (MEST)
From: Jean-Pierre Chretien [EMAIL PROTECTED]
Subject: Re: SVGs with alpha channel transparency
To: lyx-users@lists.lyx.org


Date: Wed, 21 Jun 2006 09:57:10 +1000
From: John Pye [EMAIL PROTECTED]
To: Jean-Pierre Chretien [EMAIL PROTECTED]
CC: lyx-users@lists.lyx.org
Subject: Re: SVGs with alpha channel transparency

Hi Jean-Pierre,
[...]
A side conclusion of this thread (which was about svg export in general, not 
specific to transparency),
it came out that inkscape export could only provide transparency with bitmap 
output (png). 

Uwe pointed out that a recent version of inkscape provides a transparent pdf 
output.

Another pointer, borrowed from the TexLive mailing list:
http://www.inf.bme.hu/~pts/sam2p/

I read there that 
sam2p can create EPS and PDF images with transparency
Alas, sam2p starts from bitmaps, not from vector graphics...

-- 
Jean-Pierre



Re: SVGs with alpha channel transparency

2006-06-22 Thread Helge Hafting

John Pye wrote:
Your approach defeats the purpose of using SVG in the first place, and 
will result in much large PDF files that I am currently getting. I 
really want to work out how use my SVG-with-alpha directly in LyX, or 
at least some vector format that will look OK.


I wonder if there's an SVG-to-EPS converter that doesn't something 
smart with regard to alpha channels? It would need to flatten the 
layers of the vector image in a vectorised way, rather than the 
bitmapped way that most renderers no double work.

If you're making a PDF, don't bother with EPS if you don't have to.
Can your SVG be converted to PDF directly?  pdflatex likes figures in
pdf format.  xfig drawings are treated this way already.

Helge Hafting


Re: SVGs with alpha channel transparency

2006-06-22 Thread Paul Smith

Could somebody please illustrate us about what is alpha-channel
transparency? I have searched for it through Google, but found
nothing instructive.

Paul


Re: SVGs with alpha channel transparency

2006-06-22 Thread Paul Smith

On 6/22/06, John Pye [EMAIL PROTECTED] wrote:

It's when you have 4 channels to describe each color: red, green, blue
and alpha. alpha is the opacity. If it's 1.0, then you color will show
up just as you expect. If it's zero you can see right through to
whatever's behind. Software that supports this needs to compose an image
for you by working out the combined color at each spot as the
combination of all the layers and their respective alpha values.

http://en.wikipedia.org/wiki/Alpha_channel


I understand now it. Thanks, John.

Paul


Re: SVGs with alpha channel transparency

2006-06-22 Thread Jean-Pierre Chretien

>>Date: Wed, 21 Jun 2006 17:56:40 +0200 (MEST)
>>From: Jean-Pierre Chretien <[EMAIL PROTECTED]>
>>Subject: Re: SVGs with alpha channel transparency
>>To: lyx-users@lists.lyx.org
>>
>>
>>>>Date: Wed, 21 Jun 2006 09:57:10 +1000
>>>>From: John Pye <[EMAIL PROTECTED]>
>>>>To: Jean-Pierre Chretien <[EMAIL PROTECTED]>
>>>>CC: lyx-users@lists.lyx.org
>>>>Subject: Re: SVGs with alpha channel transparency
>>>>
>>>>Hi Jean-Pierre,
[...]
>>A side conclusion of this thread (which was about svg export in general, not 
>>specific to transparency),
>>it came out that inkscape export could only provide transparency with bitmap 
>>output (png). 
>>
>>Uwe pointed out that a recent version of inkscape provides a transparent pdf 
>>output.

Another pointer, borrowed from the TexLive mailing list:
http://www.inf.bme.hu/~pts/sam2p/

I read there that 
"sam2p can create EPS and PDF images with transparency"
Alas, sam2p starts from bitmaps, not from vector graphics...

-- 
Jean-Pierre



Re: SVGs with alpha channel transparency

2006-06-22 Thread Helge Hafting

John Pye wrote:
Your approach defeats the purpose of using SVG in the first place, and 
will result in much large PDF files that I am currently getting. I 
really want to work out how use my SVG-with-alpha directly in LyX, or 
at least some vector format that will look OK.


I wonder if there's an SVG-to-EPS converter that doesn't something 
smart with regard to alpha channels? It would need to flatten the 
layers of the vector image in a vectorised way, rather than the 
bitmapped way that most renderers no double work.

If you're making a PDF, don't bother with EPS if you don't have to.
Can your SVG be converted to PDF directly?  pdflatex likes figures in
pdf format.  xfig drawings are treated this way already.

Helge Hafting


Re: SVGs with alpha channel transparency

2006-06-22 Thread Paul Smith

Could somebody please illustrate us about what is "alpha-channel
transparency"? I have searched for it through Google, but found
nothing instructive.

Paul


Re: SVGs with alpha channel transparency

2006-06-22 Thread Paul Smith

On 6/22/06, John Pye <[EMAIL PROTECTED]> wrote:

It's when you have 4 channels to describe each color: red, green, blue
and alpha. alpha is the opacity. If it's 1.0, then you color will show
up just as you expect. If it's zero you can see right through to
whatever's behind. Software that supports this needs to compose an image
for you by working out the combined color at each spot as the
combination of all the layers and their respective alpha values.

http://en.wikipedia.org/wiki/Alpha_channel


I understand now it. Thanks, John.

Paul


Re: SVGs with alpha channel transparency

2006-06-21 Thread Stephen Harris

John Pye wrote:
Your approach defeats the purpose of using SVG in the first place, and 
will result in much large PDF files that I am currently getting. I 
really want to work out how use my SVG-with-alpha directly in LyX, or at 
least some vector format that will look OK.


I wonder if there's an SVG-to-EPS converter that doesn't something smart 
with regard to alpha channels? It would need to flatten the layers of 
the vector image in a vectorised way, rather than the bitmapped way that 
most renderers no double work.


Perhaps I just need to give up on the alpha-channel idea...

Cheers
JP

Stephen Harris wrote:

John Pye wrote:

Hi Uwe,

This approach (save as PDF from Inkscape) did not give me alpha 
channel transparency in my PDF. For example:


On the left is a PNG exported from Inkscape (or alternatively, 
generated using 'rsvg-convert'. On the right is the PDF exported by 
Inkscape.


So I'm still stuck with no alpha channel; the only approach still is 
to use a PNG conversion filter, which means blurry figures.


I'm hoping that rsvg-convert's PDF output might do a better job than 
Inkscape's, but haven't succeeded with that (the LyX builtin 
'convert' convert seems to get in the way for some reason).


Cheers
JP



This is a recommended method I found before:

Alternatively, SVG to EPS or PDF

1. Open with inkscape.
2. Export to png (huge hi-resolution)
3. Open with the GIMP
4. Save as .eps
5. gsview (or linux command) convert to .ps
6. ps2pdf convert .ps to .pdf

Regards,
Stephen






Adobe is a supporter of SVG and recommends Adobe Illustrator CS
and they also have a viewer. Notoriously poor support for Linux.

http://www.adobe.com/svg/viewer/install/main.html

*  Current support documentation (PDF: 743k)
* Adobe® SVG Viewer for Windows® (PDF: 65k)
* Adobe SVG Viewer for Macintosh (PDF: 70k)

Regards,
Stephen



Re: SVGs with alpha channel transparency

2006-06-21 Thread Georg Baum
John Pye wrote:

 Hi Jean-Pierre,
 

   Re: Lyx 1.4.0pre3 + SVG + pdflatex

 Georg Baum
 Tue, 31 Jan 2006 00:56:43 -0800

 Alfonso Gazo wrote:

  After, when generating the PDF file, it produces a messy graphic just
  in the place the SVG graphic should be. I've found that LyX is somewhat
  converting from SVG to EPS and then to PNG. Finally, PNG image is
  included in PDF file.

 Correct. This is unfortunately hardcoded in LyX.
 
 Is that still true?

Yes.

 I take it to mean that I can't bypass LyX's use of 
 'convert' in converting my SVG first to a PNG?

No, you misunderstood. You can configure any converter you like for svg-png
conversion. You can currently not change the target format png: For
pdflatex export included graphics are always converted to png if they
cannot be used directly.
The workaround to get svg-pdf conversion is to create an external template
(IIRC more detailed instructions are in the list archive).


Georg



Re: SVGs with alpha channel transparency

2006-06-21 Thread Jose' Matos
On Wednesday 21 June 2006 09:16, Georg Baum wrote:
 The workaround to get svg-pdf conversion is to create an external template
 (IIRC more detailed instructions are in the list archive).

  Georg I think that here you mean an external inset or am I wrong?

 Georg

-- 
José Abílio


Re: SVGs with alpha channel transparency

2006-06-21 Thread Georg Baum
Jose' Matos wrote:

 On Wednesday 21 June 2006 09:16, Georg Baum wrote:
 The workaround to get svg-pdf conversion is to create an external
 template (IIRC more detailed instructions are in the list archive).
 
   Georg I think that here you mean an external inset or am I wrong?

Yes and no: First you need yo create a template , then you can use it in an
external inset. I attach a template that I created some time ago. It might
or might not work, I forgot.


GeorgTemplate VectorGraphics
# By default, InsetExternal is displayed as a grey button
# containing this text.
GuiName Vector: $$AbsOrRelPathParent$$Basename
# This text is used in the External dialog.
# Provide enough information to explain to the user just
# what the template can provide him with.
HelpText
A vector drawing.
HelpTextEnd
# ANY file type can be displayed as a RasterImage.
# Specifically, LyX will attempt to interrogate the file itself
# in order to deduce its format.
InputFormat *
# Globbing pattern used when browsing for a Raster image file.
FileFilter *.{pdf,eps,fig,obj,tgo,svg}
# Set to true if the file represented by the template
# must be generated by LyX.
AutomaticProduction true
# LyX has hard-coded support for these transformations
Transform Rotate
Transform Resize
Transform Clip
Transform Extra
Format LaTeX
TransformOption Rotate RotationLatexOption
TransformOption Resize ResizeLatexOption
TransformOption Clip   ClipLatexOption
TransformOption Extra  ExtraOption
Option Arg [$$Extra,$$Rotate,$$Resize,$$Clip]
# This string is what is output to the LaTeX file.
Product \\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}
UpdateFormat eps
UpdateResult $$AbsPath$$Basename.eps
Requirement graphicx
ReferencedFile latex $$AbsPath$$Basename.eps
ReferencedFile dvi   $$AbsPath$$Basename.eps
FormatEnd
Format PDFLaTeX
TransformCommand Rotate RotationLatexCommand
TransformCommand Resize ResizeLatexCommand
# FIXME: use native pdfximage resizing
# FIXME: support Clip
# FIXME: support Extra
Product 
$$RotateFront$$ResizeFront\\pdfximage{$$AbsOrRelPathMaster$$Basename.pdf}$$ResizeBack$$RotateBack
UpdateFormat pdf
UpdateResult $$AbsPath$$Basename.pdf
Requirement graphicx
ReferencedFile latex $$AbsPath$$Basename.pdf
FormatEnd
Format Ascii
Product $$Contents(\$$AbsPath$$Basename.asc\)
UpdateFormat asciiimage
UpdateResult $$AbsPath$$Basename.asc
FormatEnd
Format DocBook
Product graphic 
fileref=\$$AbsOrRelPathMaster$$Basename.eps\/graphic
UpdateFormat eps
UpdateResult $$AbsPath$$Basename.eps
ReferencedFile docbook $$AbsPath$$Basename.eps
ReferencedFile docbook-xml $$AbsPath$$Basename.eps
FormatEnd
Format LinuxDoc
Product [VectorGraphic: $$FName]
FormatEnd
TemplateEnd


Re: SVGs with alpha channel transparency

2006-06-21 Thread Jean-Pierre Chretien

Date: Wed, 21 Jun 2006 09:57:10 +1000
From: John Pye [EMAIL PROTECTED]
To: Jean-Pierre Chretien [EMAIL PROTECTED]
CC: lyx-users@lists.lyx.org
Subject: Re: SVGs with alpha channel transparency

Hi Jean-Pierre,


   Re: Lyx 1.4.0pre3 + SVG + pdflatex

 Georg Baum
 Tue, 31 Jan 2006 00:56:43 -0800

 Alfonso Gazo wrote:

  After, when generating the PDF file, it produces a messy graphic just in
  the place the SVG graphic should be. I've found that LyX is somewhat
  converting from SVG to EPS and then to PNG. Finally, PNG image is
  included in PDF file.

 Correct. This is unfortunately hardcoded in LyX.

Is that still true? I take it to mean that I can't bypass LyX's use of 
'convert' in converting my SVG first to a PNG?

Ahum, Georg wrote that, I'm sorry I pointed out the wrong message in the thread.
A side conclusion of this thread (which was about svg export in general, not 
specific to transparency),
it came out that inkscape export could only provide transparency with bitmap 
output (png). 

Uwe pointed out that a recent version of inkscape provides a transparent pdf 
output.

Regards

-- 
Jean-Pierre




Re: SVGs with alpha channel transparency

2006-06-21 Thread Stephen Harris

John Pye wrote:
Your approach defeats the purpose of using SVG in the first place, and 
will result in much large PDF files that I am currently getting. I 
really want to work out how use my SVG-with-alpha directly in LyX, or at 
least some vector format that will look OK.


I wonder if there's an SVG-to-EPS converter that doesn't something smart 
with regard to alpha channels? It would need to flatten the layers of 
the vector image in a vectorised way, rather than the bitmapped way that 
most renderers no double work.


Perhaps I just need to give up on the alpha-channel idea...

Cheers
JP

Stephen Harris wrote:

John Pye wrote:

Hi Uwe,

This approach (save as PDF from Inkscape) did not give me alpha 
channel transparency in my PDF. For example:


On the left is a PNG exported from Inkscape (or alternatively, 
generated using 'rsvg-convert'. On the right is the PDF exported by 
Inkscape.


So I'm still stuck with no alpha channel; the only approach still is 
to use a PNG conversion filter, which means blurry figures.


I'm hoping that rsvg-convert's PDF output might do a better job than 
Inkscape's, but haven't succeeded with that (the LyX builtin 
'convert' convert seems to get in the way for some reason).


Cheers
JP



This is a recommended method I found before:

Alternatively, SVG to EPS or PDF

1. Open with inkscape.
2. Export to png (huge hi-resolution)
3. Open with the GIMP
4. Save as .eps
5. gsview (or linux command) convert to .ps
6. ps2pdf convert .ps to .pdf

Regards,
Stephen






Adobe is a supporter of SVG and recommends Adobe Illustrator CS
and they also have a viewer. Notoriously poor support for Linux.

http://www.adobe.com/svg/viewer/install/main.html

*  Current support documentation (PDF: 743k)
* Adobe® SVG Viewer for Windows® (PDF: 65k)
* Adobe SVG Viewer for Macintosh (PDF: 70k)

Regards,
Stephen



Re: SVGs with alpha channel transparency

2006-06-21 Thread Georg Baum
John Pye wrote:

 Hi Jean-Pierre,
 

   Re: Lyx 1.4.0pre3 + SVG + pdflatex

 Georg Baum
 Tue, 31 Jan 2006 00:56:43 -0800

 Alfonso Gazo wrote:

  After, when generating the PDF file, it produces a messy graphic just
  in the place the SVG graphic should be. I've found that LyX is somewhat
  converting from SVG to EPS and then to PNG. Finally, PNG image is
  included in PDF file.

 Correct. This is unfortunately hardcoded in LyX.
 
 Is that still true?

Yes.

 I take it to mean that I can't bypass LyX's use of 
 'convert' in converting my SVG first to a PNG?

No, you misunderstood. You can configure any converter you like for svg-png
conversion. You can currently not change the target format png: For
pdflatex export included graphics are always converted to png if they
cannot be used directly.
The workaround to get svg-pdf conversion is to create an external template
(IIRC more detailed instructions are in the list archive).


Georg



Re: SVGs with alpha channel transparency

2006-06-21 Thread Jose' Matos
On Wednesday 21 June 2006 09:16, Georg Baum wrote:
 The workaround to get svg-pdf conversion is to create an external template
 (IIRC more detailed instructions are in the list archive).

  Georg I think that here you mean an external inset or am I wrong?

 Georg

-- 
José Abílio


Re: SVGs with alpha channel transparency

2006-06-21 Thread Georg Baum
Jose' Matos wrote:

 On Wednesday 21 June 2006 09:16, Georg Baum wrote:
 The workaround to get svg-pdf conversion is to create an external
 template (IIRC more detailed instructions are in the list archive).
 
   Georg I think that here you mean an external inset or am I wrong?

Yes and no: First you need yo create a template , then you can use it in an
external inset. I attach a template that I created some time ago. It might
or might not work, I forgot.


GeorgTemplate VectorGraphics
# By default, InsetExternal is displayed as a grey button
# containing this text.
GuiName Vector: $$AbsOrRelPathParent$$Basename
# This text is used in the External dialog.
# Provide enough information to explain to the user just
# what the template can provide him with.
HelpText
A vector drawing.
HelpTextEnd
# ANY file type can be displayed as a RasterImage.
# Specifically, LyX will attempt to interrogate the file itself
# in order to deduce its format.
InputFormat *
# Globbing pattern used when browsing for a Raster image file.
FileFilter *.{pdf,eps,fig,obj,tgo,svg}
# Set to true if the file represented by the template
# must be generated by LyX.
AutomaticProduction true
# LyX has hard-coded support for these transformations
Transform Rotate
Transform Resize
Transform Clip
Transform Extra
Format LaTeX
TransformOption Rotate RotationLatexOption
TransformOption Resize ResizeLatexOption
TransformOption Clip   ClipLatexOption
TransformOption Extra  ExtraOption
Option Arg [$$Extra,$$Rotate,$$Resize,$$Clip]
# This string is what is output to the LaTeX file.
Product \\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}
UpdateFormat eps
UpdateResult $$AbsPath$$Basename.eps
Requirement graphicx
ReferencedFile latex $$AbsPath$$Basename.eps
ReferencedFile dvi   $$AbsPath$$Basename.eps
FormatEnd
Format PDFLaTeX
TransformCommand Rotate RotationLatexCommand
TransformCommand Resize ResizeLatexCommand
# FIXME: use native pdfximage resizing
# FIXME: support Clip
# FIXME: support Extra
Product 
$$RotateFront$$ResizeFront\\pdfximage{$$AbsOrRelPathMaster$$Basename.pdf}$$ResizeBack$$RotateBack
UpdateFormat pdf
UpdateResult $$AbsPath$$Basename.pdf
Requirement graphicx
ReferencedFile latex $$AbsPath$$Basename.pdf
FormatEnd
Format Ascii
Product $$Contents(\$$AbsPath$$Basename.asc\)
UpdateFormat asciiimage
UpdateResult $$AbsPath$$Basename.asc
FormatEnd
Format DocBook
Product graphic 
fileref=\$$AbsOrRelPathMaster$$Basename.eps\/graphic
UpdateFormat eps
UpdateResult $$AbsPath$$Basename.eps
ReferencedFile docbook $$AbsPath$$Basename.eps
ReferencedFile docbook-xml $$AbsPath$$Basename.eps
FormatEnd
Format LinuxDoc
Product [VectorGraphic: $$FName]
FormatEnd
TemplateEnd


Re: SVGs with alpha channel transparency

2006-06-21 Thread Jean-Pierre Chretien

Date: Wed, 21 Jun 2006 09:57:10 +1000
From: John Pye [EMAIL PROTECTED]
To: Jean-Pierre Chretien [EMAIL PROTECTED]
CC: lyx-users@lists.lyx.org
Subject: Re: SVGs with alpha channel transparency

Hi Jean-Pierre,


   Re: Lyx 1.4.0pre3 + SVG + pdflatex

 Georg Baum
 Tue, 31 Jan 2006 00:56:43 -0800

 Alfonso Gazo wrote:

  After, when generating the PDF file, it produces a messy graphic just in
  the place the SVG graphic should be. I've found that LyX is somewhat
  converting from SVG to EPS and then to PNG. Finally, PNG image is
  included in PDF file.

 Correct. This is unfortunately hardcoded in LyX.

Is that still true? I take it to mean that I can't bypass LyX's use of 
'convert' in converting my SVG first to a PNG?

Ahum, Georg wrote that, I'm sorry I pointed out the wrong message in the thread.
A side conclusion of this thread (which was about svg export in general, not 
specific to transparency),
it came out that inkscape export could only provide transparency with bitmap 
output (png). 

Uwe pointed out that a recent version of inkscape provides a transparent pdf 
output.

Regards

-- 
Jean-Pierre




Re: SVGs with alpha channel transparency

2006-06-21 Thread Stephen Harris

John Pye wrote:
Your approach defeats the purpose of using SVG in the first place, and 
will result in much large PDF files that I am currently getting. I 
really want to work out how use my SVG-with-alpha directly in LyX, or at 
least some vector format that will look OK.


I wonder if there's an SVG-to-EPS converter that doesn't something smart 
with regard to alpha channels? It would need to flatten the layers of 
the vector image in a vectorised way, rather than the bitmapped way that 
most renderers no double work.


Perhaps I just need to give up on the alpha-channel idea...

Cheers
JP

Stephen Harris wrote:

John Pye wrote:

Hi Uwe,

This approach (save as PDF from Inkscape) did not give me alpha 
channel transparency in my PDF. For example:


On the left is a PNG exported from Inkscape (or alternatively, 
generated using 'rsvg-convert'. On the right is the PDF exported by 
Inkscape.


So I'm still stuck with no alpha channel; the only approach still is 
to use a PNG conversion filter, which means blurry figures.


I'm hoping that rsvg-convert's PDF output might do a better job than 
Inkscape's, but haven't succeeded with that (the LyX builtin 
'convert' convert seems to get in the way for some reason).


Cheers
JP



This is a recommended method I found before:

Alternatively, SVG to EPS or PDF

1. Open with inkscape.
2. Export to png (huge hi-resolution)
3. Open with the GIMP
4. Save as .eps
5. gsview (or linux command) convert to .ps
6. ps2pdf convert .ps to .pdf

Regards,
Stephen






Adobe is a supporter of SVG and recommends Adobe Illustrator CS
and they also have a viewer. Notoriously poor support for Linux.

http://www.adobe.com/svg/viewer/install/main.html

*  Current support documentation (PDF: 743k)
* Adobe® SVG Viewer for Windows® (PDF: 65k)
* Adobe SVG Viewer for Macintosh (PDF: 70k)

Regards,
Stephen



Re: SVGs with alpha channel transparency

2006-06-21 Thread Georg Baum
John Pye wrote:

> Hi Jean-Pierre,
> 
>>
>>   Re: Lyx 1.4.0pre3 + SVG + pdflatex
>>
>> Georg Baum
>> Tue, 31 Jan 2006 00:56:43 -0800
>>
>> Alfonso Gazo wrote:
>>
>> > After, when generating the PDF file, it produces a messy graphic just
>> > in the place the SVG graphic should be. I've found that LyX is somewhat
>> > converting from SVG to EPS and then to PNG. Finally, PNG image is
>> > included in PDF file.
>>
>> Correct. This is unfortunately hardcoded in LyX.
> 
> Is that still true?

Yes.

> I take it to mean that I can't bypass LyX's use of 
> 'convert' in converting my SVG first to a PNG?

No, you misunderstood. You can configure any converter you like for svg->png
conversion. You can currently not change the target format png: For
pdflatex export included graphics are always converted to png if they
cannot be used directly.
The workaround to get svg->pdf conversion is to create an external template
(IIRC more detailed instructions are in the list archive).


Georg



Re: SVGs with alpha channel transparency

2006-06-21 Thread Jose' Matos
On Wednesday 21 June 2006 09:16, Georg Baum wrote:
> The workaround to get svg->pdf conversion is to create an external template
> (IIRC more detailed instructions are in the list archive).

  Georg I think that here you mean an external inset or am I wrong?

> Georg

-- 
José Abílio


Re: SVGs with alpha channel transparency

2006-06-21 Thread Georg Baum
Jose' Matos wrote:

> On Wednesday 21 June 2006 09:16, Georg Baum wrote:
>> The workaround to get svg->pdf conversion is to create an external
>> template (IIRC more detailed instructions are in the list archive).
> 
>   Georg I think that here you mean an external inset or am I wrong?

Yes and no: First you need yo create a template , then you can use it in an
external inset. I attach a template that I created some time ago. It might
or might not work, I forgot.


GeorgTemplate VectorGraphics
# By default, InsetExternal is displayed as a grey button
# containing this text.
GuiName "Vector: $$AbsOrRelPathParent$$Basename"
# This text is used in the External dialog.
# Provide enough information to explain to the user just
# what the template can provide him with.
HelpText
A vector drawing.
HelpTextEnd
# ANY file type can be displayed as a RasterImage.
# Specifically, LyX will attempt to interrogate the file itself
# in order to deduce its format.
InputFormat "*"
# Globbing pattern used when browsing for a Raster image file.
FileFilter "*.{pdf,eps,fig,obj,tgo,svg}"
# Set to "true" if the file represented by the template
# must be generated by LyX.
AutomaticProduction true
# LyX has hard-coded support for these transformations
Transform Rotate
Transform Resize
Transform Clip
Transform Extra
Format LaTeX
TransformOption Rotate RotationLatexOption
TransformOption Resize ResizeLatexOption
TransformOption Clip   ClipLatexOption
TransformOption Extra  ExtraOption
Option Arg "[$$Extra,$$Rotate,$$Resize,$$Clip]"
# This string is what is output to the LaTeX file.
Product "\\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}"
UpdateFormat eps
UpdateResult "$$AbsPath$$Basename.eps"
Requirement "graphicx"
ReferencedFile latex "$$AbsPath$$Basename.eps"
ReferencedFile dvi   "$$AbsPath$$Basename.eps"
FormatEnd
Format PDFLaTeX
TransformCommand Rotate RotationLatexCommand
TransformCommand Resize ResizeLatexCommand
# FIXME: use native pdfximage resizing
# FIXME: support Clip
# FIXME: support Extra
Product 
"$$RotateFront$$ResizeFront\\pdfximage{$$AbsOrRelPathMaster$$Basename.pdf}$$ResizeBack$$RotateBack"
UpdateFormat pdf
UpdateResult "$$AbsPath$$Basename.pdf"
Requirement "graphicx"
ReferencedFile latex "$$AbsPath$$Basename.pdf"
FormatEnd
Format Ascii
Product "$$Contents(\"$$AbsPath$$Basename.asc\")"
UpdateFormat asciiimage
UpdateResult "$$AbsPath$$Basename.asc"
FormatEnd
Format DocBook
Product ""
UpdateFormat eps
UpdateResult "$$AbsPath$$Basename.eps"
ReferencedFile docbook "$$AbsPath$$Basename.eps"
ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
FormatEnd
Format LinuxDoc
Product "[VectorGraphic: $$FName]"
FormatEnd
TemplateEnd


Re: SVGs with alpha channel transparency

2006-06-21 Thread Jean-Pierre Chretien

>>Date: Wed, 21 Jun 2006 09:57:10 +1000
>>From: John Pye <[EMAIL PROTECTED]>
>>To: Jean-Pierre Chretien <[EMAIL PROTECTED]>
>>CC: lyx-users@lists.lyx.org
>>Subject: Re: SVGs with alpha channel transparency
>>
>>Hi Jean-Pierre,
>>
>>>
>>>   Re: Lyx 1.4.0pre3 + SVG + pdflatex
>>>
>>> Georg Baum
>>> Tue, 31 Jan 2006 00:56:43 -0800
>>>
>>> Alfonso Gazo wrote:
>>>
>>> > After, when generating the PDF file, it produces a messy graphic just in
>>> > the place the SVG graphic should be. I've found that LyX is somewhat
>>> > converting from SVG to EPS and then to PNG. Finally, PNG image is
>>> > included in PDF file.
>>>
>>> Correct. This is unfortunately hardcoded in LyX.
>>
>>Is that still true? I take it to mean that I can't bypass LyX's use of 
>>'convert' in converting my SVG first to a PNG?

Ahum, Georg wrote that, I'm sorry I pointed out the wrong message in the thread.
A side conclusion of this thread (which was about svg export in general, not 
specific to transparency),
it came out that inkscape export could only provide transparency with bitmap 
output (png). 

Uwe pointed out that a recent version of inkscape provides a transparent pdf 
output.

Regards

-- 
Jean-Pierre




Re: SVGs with alpha channel transparency

2006-06-20 Thread Paul Smith

On 6/20/06, John Pye [EMAIL PROTECTED] wrote:

What's the right string of tools to embed an SVG with alpha-channel
transparency into a LyX document so that I get the alpha channel
appearing right in the end-product PDF file?

I've tried a few combinations such as intermediate EPS and PS file (no
transparency) and 'convert' (it goes to bitmap so I lose my hard-edged
lines). I think that I need to go for an 'encapsulated PDF' somehow,
perhaps using 'rsvg-convert' but so far haven't been able to make it work.

My particular case is contour plot with coloured regions overlaid,
generated from Matplotlib and hand-edited a little with Inkscape.

Has anyone had some experience with this that they could pass on?


Have you tried to save your picture as ps and then issued the command

ps2epsi picture.eps

?

Paul


Re: SVGs with alpha channel transparency

2006-06-20 Thread Jean-Pierre Chretien

Date: Wed, 21 Jun 2006 01:24:22 +1000
From: John Pye [EMAIL PROTECTED]
To: lyx-users@lists.lyx.org lyx-users@lists.lyx.org
Subject: SVGs with alpha channel transparency

Hi all

What's the right string of tools to embed an SVG with alpha-channel 
transparency into a LyX document so that I get the alpha channel 
appearing right in the end-product PDF file?

I've tried a few combinations such as intermediate EPS and PS file (no 
transparency) and 'convert' (it goes to bitmap so I lose my hard-edged 
lines). I think that I need to go for an 'encapsulated PDF' somehow, 
perhaps using 'rsvg-convert' but so far haven't been able to make it work.

My particular case is contour plot with coloured regions overlaid, 
generated from Matplotlib and hand-edited a little with Inkscape.

Has anyone had some experience with this that they could pass on?

There is a thread about SVG in the archive:
http://www.mail-archive.com/lyx-users@lists.lyx.org/msg45269.html

Transparency is not discussed however.

HTH

-- 
Jean-Pierre





Re: SVGs with alpha channel transparency

2006-06-20 Thread Uwe Stöhr

John Pye wrote:

What's the right string of tools to embed an SVG with alpha-channel 
transparency into a LyX document so that I get the alpha channel 
appearing right in the end-product PDF file?


Transform your SVG to PDF. Inkscape supports alpha channels in SVG and 
in PNG, see


http://wiki.inkscape.org/wiki/index.php/InkscapeFeatures

The new version 0.44 of Inkscape:

http://sourceforge.net/project/showfiles.php?group_id=93438package_id=99112

comes with a native PDF export, so that the alpha channel should be 
included in the PDF. The resulting PDF image can directly be used in LyX 
when you use pdflatex to generate the PDF output.


regards Uwe


Re: SVGs with alpha channel transparency

2006-06-20 Thread John Pye




Hi Uwe,

This approach (save as PDF from Inkscape) did not give me alpha channel
transparency in my PDF. For example:

On the left is a PNG exported from Inkscape (or alternatively,
generated using 'rsvg-convert'. On the right is the PDF exported by
Inkscape.

So I'm still stuck with no alpha channel; the only approach still is to
use a PNG conversion filter, which means blurry figures.

I'm hoping that rsvg-convert's PDF output might do a better job than
Inkscape's, but haven't succeeded with that (the LyX builtin 'convert'
convert seems to get in the way for some reason).

Cheers
JP



Uwe Sthr wrote:
John Pye
wrote:
  
  
  What's the right string of tools to embed an
SVG with alpha-channel transparency into a LyX document so that I get
the alpha channel appearing right in the end-product PDF file?

  
  
Transform your SVG to PDF. Inkscape supports alpha channels in SVG and
in PNG, see
  
  
http://wiki.inkscape.org/wiki/index.php/InkscapeFeatures
  
  
The new version 0.44 of Inkscape:
  
  
http://sourceforge.net/project/showfiles.php?group_id=93438package_id=99112
  
  
comes with a native PDF export, so that the alpha channel should be
included in the PDF. The resulting PDF image can directly be used in
LyX when you use pdflatex to generate the PDF output.
  
  
regards Uwe
  
  


-- 
John Pye
Department of Mechanical and Manufacturing Engineering
University of New South Wales, Sydney, Australia
http://pye.dyndns.org/





Re: SVGs with alpha channel transparency

2006-06-20 Thread John Pye

Hi Jean-Pierre,



  Re: Lyx 1.4.0pre3 + SVG + pdflatex

Georg Baum
Tue, 31 Jan 2006 00:56:43 -0800

Alfonso Gazo wrote:

 After, when generating the PDF file, it produces a messy graphic just in
 the place the SVG graphic should be. I've found that LyX is somewhat
 converting from SVG to EPS and then to PNG. Finally, PNG image is
 included in PDF file.

Correct. This is unfortunately hardcoded in LyX.


Is that still true? I take it to mean that I can't bypass LyX's use of 
'convert' in converting my SVG first to a PNG?


Cheers
JP




Jean-Pierre Chretien wrote:

Date: Wed, 21 Jun 2006 01:24:22 +1000
From: John Pye [EMAIL PROTECTED]
To: lyx-users@lists.lyx.org lyx-users@lists.lyx.org
Subject: SVGs with alpha channel transparency

Hi all

What's the right string of tools to embed an SVG with alpha-channel 
transparency into a LyX document so that I get the alpha channel 
appearing right in the end-product PDF file?


I've tried a few combinations such as intermediate EPS and PS file (no 
transparency) and 'convert' (it goes to bitmap so I lose my hard-edged 
lines). I think that I need to go for an 'encapsulated PDF' somehow, 
perhaps using 'rsvg-convert' but so far haven't been able to make it work.


My particular case is contour plot with coloured regions overlaid, 
generated from Matplotlib and hand-edited a little with Inkscape.


Has anyone had some experience with this that they could pass on?
  


There is a thread about SVG in the archive:
http://www.mail-archive.com/lyx-users@lists.lyx.org/msg45269.html

Transparency is not discussed however.

HTH

  


--
John Pye
Department of Mechanical and Manufacturing Engineering
University of New South Wales, Sydney, Australia
http://pye.dyndns.org/



Re: SVGs with alpha channel transparency

2006-06-20 Thread Uwe Stöhr

John Pye wrote:

Is that still true? I take it to mean that I can't bypass LyX's use of 
'convert' in converting my SVG first to a PNG?


You should be able to define a SVG - PNG converter in LyX's preferences.
If you use Imagemagick's convert utility to do this you probably save 
the alpha channel.

Could you please send my your SVG-file for some tests? Thanks in advance.

regards Uwe


Re: SVGs with alpha channel transparency

2006-06-20 Thread Stephen Harris

John Pye wrote:

Hi Uwe,

This approach (save as PDF from Inkscape) did not give me alpha channel 
transparency in my PDF. For example:


On the left is a PNG exported from Inkscape (or alternatively, generated 
using 'rsvg-convert'. On the right is the PDF exported by Inkscape.


So I'm still stuck with no alpha channel; the only approach still is to 
use a PNG conversion filter, which means blurry figures.


I'm hoping that rsvg-convert's PDF output might do a better job than 
Inkscape's, but haven't succeeded with that (the LyX builtin 'convert' 
convert seems to get in the way for some reason).


Cheers
JP



This is a recommended method I found before:

Alternatively, SVG to EPS or PDF

1. Open with inkscape.
2. Export to png (huge hi-resolution)
3. Open with the GIMP
4. Save as .eps
5. gsview (or linux command) convert to .ps
6. ps2pdf convert .ps to .pdf

Regards,
Stephen


Re: SVGs with alpha channel transparency

2006-06-20 Thread John Pye
Your approach defeats the purpose of using SVG in the first place, and 
will result in much large PDF files that I am currently getting. I 
really want to work out how use my SVG-with-alpha directly in LyX, or at 
least some vector format that will look OK.


I wonder if there's an SVG-to-EPS converter that doesn't something smart 
with regard to alpha channels? It would need to flatten the layers of 
the vector image in a vectorised way, rather than the bitmapped way that 
most renderers no double work.


Perhaps I just need to give up on the alpha-channel idea...

Cheers
JP

Stephen Harris wrote:

John Pye wrote:

Hi Uwe,

This approach (save as PDF from Inkscape) did not give me alpha 
channel transparency in my PDF. For example:


On the left is a PNG exported from Inkscape (or alternatively, 
generated using 'rsvg-convert'. On the right is the PDF exported by 
Inkscape.


So I'm still stuck with no alpha channel; the only approach still is 
to use a PNG conversion filter, which means blurry figures.


I'm hoping that rsvg-convert's PDF output might do a better job than 
Inkscape's, but haven't succeeded with that (the LyX builtin 
'convert' convert seems to get in the way for some reason).


Cheers
JP



This is a recommended method I found before:

Alternatively, SVG to EPS or PDF

1. Open with inkscape.
2. Export to png (huge hi-resolution)
3. Open with the GIMP
4. Save as .eps
5. gsview (or linux command) convert to .ps
6. ps2pdf convert .ps to .pdf

Regards,
Stephen



--
John Pye
Department of Mechanical and Manufacturing Engineering
University of New South Wales, Sydney, Australia
http://pye.dyndns.org/



Re: SVGs with alpha channel transparency

2006-06-20 Thread Paul Smith

On 6/20/06, John Pye [EMAIL PROTECTED] wrote:

What's the right string of tools to embed an SVG with alpha-channel
transparency into a LyX document so that I get the alpha channel
appearing right in the end-product PDF file?

I've tried a few combinations such as intermediate EPS and PS file (no
transparency) and 'convert' (it goes to bitmap so I lose my hard-edged
lines). I think that I need to go for an 'encapsulated PDF' somehow,
perhaps using 'rsvg-convert' but so far haven't been able to make it work.

My particular case is contour plot with coloured regions overlaid,
generated from Matplotlib and hand-edited a little with Inkscape.

Has anyone had some experience with this that they could pass on?


Have you tried to save your picture as ps and then issued the command

ps2epsi picture.eps

?

Paul


Re: SVGs with alpha channel transparency

2006-06-20 Thread Jean-Pierre Chretien

Date: Wed, 21 Jun 2006 01:24:22 +1000
From: John Pye [EMAIL PROTECTED]
To: lyx-users@lists.lyx.org lyx-users@lists.lyx.org
Subject: SVGs with alpha channel transparency

Hi all

What's the right string of tools to embed an SVG with alpha-channel 
transparency into a LyX document so that I get the alpha channel 
appearing right in the end-product PDF file?

I've tried a few combinations such as intermediate EPS and PS file (no 
transparency) and 'convert' (it goes to bitmap so I lose my hard-edged 
lines). I think that I need to go for an 'encapsulated PDF' somehow, 
perhaps using 'rsvg-convert' but so far haven't been able to make it work.

My particular case is contour plot with coloured regions overlaid, 
generated from Matplotlib and hand-edited a little with Inkscape.

Has anyone had some experience with this that they could pass on?

There is a thread about SVG in the archive:
http://www.mail-archive.com/lyx-users@lists.lyx.org/msg45269.html

Transparency is not discussed however.

HTH

-- 
Jean-Pierre





Re: SVGs with alpha channel transparency

2006-06-20 Thread Uwe Stöhr

John Pye wrote:

What's the right string of tools to embed an SVG with alpha-channel 
transparency into a LyX document so that I get the alpha channel 
appearing right in the end-product PDF file?


Transform your SVG to PDF. Inkscape supports alpha channels in SVG and 
in PNG, see


http://wiki.inkscape.org/wiki/index.php/InkscapeFeatures

The new version 0.44 of Inkscape:

http://sourceforge.net/project/showfiles.php?group_id=93438package_id=99112

comes with a native PDF export, so that the alpha channel should be 
included in the PDF. The resulting PDF image can directly be used in LyX 
when you use pdflatex to generate the PDF output.


regards Uwe


Re: SVGs with alpha channel transparency

2006-06-20 Thread John Pye




Hi Uwe,

This approach (save as PDF from Inkscape) did not give me alpha channel
transparency in my PDF. For example:

On the left is a PNG exported from Inkscape (or alternatively,
generated using 'rsvg-convert'. On the right is the PDF exported by
Inkscape.

So I'm still stuck with no alpha channel; the only approach still is to
use a PNG conversion filter, which means blurry figures.

I'm hoping that rsvg-convert's PDF output might do a better job than
Inkscape's, but haven't succeeded with that (the LyX builtin 'convert'
convert seems to get in the way for some reason).

Cheers
JP



Uwe Sthr wrote:
John Pye
wrote:
  
  
  What's the right string of tools to embed an
SVG with alpha-channel transparency into a LyX document so that I get
the alpha channel appearing right in the end-product PDF file?

  
  
Transform your SVG to PDF. Inkscape supports alpha channels in SVG and
in PNG, see
  
  
http://wiki.inkscape.org/wiki/index.php/InkscapeFeatures
  
  
The new version 0.44 of Inkscape:
  
  
http://sourceforge.net/project/showfiles.php?group_id=93438package_id=99112
  
  
comes with a native PDF export, so that the alpha channel should be
included in the PDF. The resulting PDF image can directly be used in
LyX when you use pdflatex to generate the PDF output.
  
  
regards Uwe
  
  


-- 
John Pye
Department of Mechanical and Manufacturing Engineering
University of New South Wales, Sydney, Australia
http://pye.dyndns.org/





Re: SVGs with alpha channel transparency

2006-06-20 Thread John Pye

Hi Jean-Pierre,



  Re: Lyx 1.4.0pre3 + SVG + pdflatex

Georg Baum
Tue, 31 Jan 2006 00:56:43 -0800

Alfonso Gazo wrote:

 After, when generating the PDF file, it produces a messy graphic just in
 the place the SVG graphic should be. I've found that LyX is somewhat
 converting from SVG to EPS and then to PNG. Finally, PNG image is
 included in PDF file.

Correct. This is unfortunately hardcoded in LyX.


Is that still true? I take it to mean that I can't bypass LyX's use of 
'convert' in converting my SVG first to a PNG?


Cheers
JP




Jean-Pierre Chretien wrote:

Date: Wed, 21 Jun 2006 01:24:22 +1000
From: John Pye [EMAIL PROTECTED]
To: lyx-users@lists.lyx.org lyx-users@lists.lyx.org
Subject: SVGs with alpha channel transparency

Hi all

What's the right string of tools to embed an SVG with alpha-channel 
transparency into a LyX document so that I get the alpha channel 
appearing right in the end-product PDF file?


I've tried a few combinations such as intermediate EPS and PS file (no 
transparency) and 'convert' (it goes to bitmap so I lose my hard-edged 
lines). I think that I need to go for an 'encapsulated PDF' somehow, 
perhaps using 'rsvg-convert' but so far haven't been able to make it work.


My particular case is contour plot with coloured regions overlaid, 
generated from Matplotlib and hand-edited a little with Inkscape.


Has anyone had some experience with this that they could pass on?
  


There is a thread about SVG in the archive:
http://www.mail-archive.com/lyx-users@lists.lyx.org/msg45269.html

Transparency is not discussed however.

HTH

  


--
John Pye
Department of Mechanical and Manufacturing Engineering
University of New South Wales, Sydney, Australia
http://pye.dyndns.org/



Re: SVGs with alpha channel transparency

2006-06-20 Thread Uwe Stöhr

John Pye wrote:

Is that still true? I take it to mean that I can't bypass LyX's use of 
'convert' in converting my SVG first to a PNG?


You should be able to define a SVG - PNG converter in LyX's preferences.
If you use Imagemagick's convert utility to do this you probably save 
the alpha channel.

Could you please send my your SVG-file for some tests? Thanks in advance.

regards Uwe


Re: SVGs with alpha channel transparency

2006-06-20 Thread Stephen Harris

John Pye wrote:

Hi Uwe,

This approach (save as PDF from Inkscape) did not give me alpha channel 
transparency in my PDF. For example:


On the left is a PNG exported from Inkscape (or alternatively, generated 
using 'rsvg-convert'. On the right is the PDF exported by Inkscape.


So I'm still stuck with no alpha channel; the only approach still is to 
use a PNG conversion filter, which means blurry figures.


I'm hoping that rsvg-convert's PDF output might do a better job than 
Inkscape's, but haven't succeeded with that (the LyX builtin 'convert' 
convert seems to get in the way for some reason).


Cheers
JP



This is a recommended method I found before:

Alternatively, SVG to EPS or PDF

1. Open with inkscape.
2. Export to png (huge hi-resolution)
3. Open with the GIMP
4. Save as .eps
5. gsview (or linux command) convert to .ps
6. ps2pdf convert .ps to .pdf

Regards,
Stephen


Re: SVGs with alpha channel transparency

2006-06-20 Thread John Pye
Your approach defeats the purpose of using SVG in the first place, and 
will result in much large PDF files that I am currently getting. I 
really want to work out how use my SVG-with-alpha directly in LyX, or at 
least some vector format that will look OK.


I wonder if there's an SVG-to-EPS converter that doesn't something smart 
with regard to alpha channels? It would need to flatten the layers of 
the vector image in a vectorised way, rather than the bitmapped way that 
most renderers no double work.


Perhaps I just need to give up on the alpha-channel idea...

Cheers
JP

Stephen Harris wrote:

John Pye wrote:

Hi Uwe,

This approach (save as PDF from Inkscape) did not give me alpha 
channel transparency in my PDF. For example:


On the left is a PNG exported from Inkscape (or alternatively, 
generated using 'rsvg-convert'. On the right is the PDF exported by 
Inkscape.


So I'm still stuck with no alpha channel; the only approach still is 
to use a PNG conversion filter, which means blurry figures.


I'm hoping that rsvg-convert's PDF output might do a better job than 
Inkscape's, but haven't succeeded with that (the LyX builtin 
'convert' convert seems to get in the way for some reason).


Cheers
JP



This is a recommended method I found before:

Alternatively, SVG to EPS or PDF

1. Open with inkscape.
2. Export to png (huge hi-resolution)
3. Open with the GIMP
4. Save as .eps
5. gsview (or linux command) convert to .ps
6. ps2pdf convert .ps to .pdf

Regards,
Stephen



--
John Pye
Department of Mechanical and Manufacturing Engineering
University of New South Wales, Sydney, Australia
http://pye.dyndns.org/



Re: SVGs with alpha channel transparency

2006-06-20 Thread Paul Smith

On 6/20/06, John Pye <[EMAIL PROTECTED]> wrote:

What's the right string of tools to embed an SVG with alpha-channel
transparency into a LyX document so that I get the alpha channel
appearing right in the end-product PDF file?

I've tried a few combinations such as intermediate EPS and PS file (no
transparency) and 'convert' (it goes to bitmap so I lose my hard-edged
lines). I think that I need to go for an 'encapsulated PDF' somehow,
perhaps using 'rsvg-convert' but so far haven't been able to make it work.

My particular case is contour plot with coloured regions overlaid,
generated from Matplotlib and hand-edited a little with Inkscape.

Has anyone had some experience with this that they could pass on?


Have you tried to save your picture as ps and then issued the command

ps2epsi picture.eps

?

Paul


Re: SVGs with alpha channel transparency

2006-06-20 Thread Jean-Pierre Chretien

>>Date: Wed, 21 Jun 2006 01:24:22 +1000
>>From: John Pye <[EMAIL PROTECTED]>
>>To: "lyx-users@lists.lyx.org" 
>>Subject: SVGs with alpha channel transparency
>>
>>Hi all
>>
>>What's the right string of tools to embed an SVG with alpha-channel 
>>transparency into a LyX document so that I get the alpha channel 
>>appearing right in the end-product PDF file?
>>
>>I've tried a few combinations such as intermediate EPS and PS file (no 
>>transparency) and 'convert' (it goes to bitmap so I lose my hard-edged 
>>lines). I think that I need to go for an 'encapsulated PDF' somehow, 
>>perhaps using 'rsvg-convert' but so far haven't been able to make it work.
>>
>>My particular case is contour plot with coloured regions overlaid, 
>>generated from Matplotlib and hand-edited a little with Inkscape.
>>
>>Has anyone had some experience with this that they could pass on?

There is a thread about SVG in the archive:
http://www.mail-archive.com/lyx-users@lists.lyx.org/msg45269.html

Transparency is not discussed however.

HTH

-- 
Jean-Pierre





Re: SVGs with alpha channel transparency

2006-06-20 Thread Uwe Stöhr

John Pye wrote:

What's the right string of tools to embed an SVG with alpha-channel 
transparency into a LyX document so that I get the alpha channel 
appearing right in the end-product PDF file?


Transform your SVG to PDF. Inkscape supports alpha channels in SVG and 
in PNG, see


http://wiki.inkscape.org/wiki/index.php/InkscapeFeatures

The new version 0.44 of Inkscape:

http://sourceforge.net/project/showfiles.php?group_id=93438_id=99112

comes with a native PDF export, so that the alpha channel should be 
included in the PDF. The resulting PDF image can directly be used in LyX 
when you use pdflatex to generate the PDF output.


regards Uwe


Re: SVGs with alpha channel transparency

2006-06-20 Thread John Pye




Hi Uwe,

This approach (save as PDF from Inkscape) did not give me alpha channel
transparency in my PDF. For example:

On the left is a PNG exported from Inkscape (or alternatively,
generated using 'rsvg-convert'. On the right is the PDF exported by
Inkscape.

So I'm still stuck with no alpha channel; the only approach still is to
use a PNG conversion filter, which means blurry figures.

I'm hoping that rsvg-convert's PDF output might do a better job than
Inkscape's, but haven't succeeded with that (the LyX builtin 'convert'
convert seems to get in the way for some reason).

Cheers
JP



Uwe Stöhr wrote:
John Pye
wrote:
  
  
  What's the right string of tools to embed an
SVG with alpha-channel transparency into a LyX document so that I get
the alpha channel appearing right in the end-product PDF file?

  
  
Transform your SVG to PDF. Inkscape supports alpha channels in SVG and
in PNG, see
  
  
http://wiki.inkscape.org/wiki/index.php/InkscapeFeatures
  
  
The new version 0.44 of Inkscape:
  
  
http://sourceforge.net/project/showfiles.php?group_id=93438_id=99112
  
  
comes with a native PDF export, so that the alpha channel should be
included in the PDF. The resulting PDF image can directly be used in
LyX when you use pdflatex to generate the PDF output.
  
  
regards Uwe
  
  


-- 
John Pye
Department of Mechanical and Manufacturing Engineering
University of New South Wales, Sydney, Australia
http://pye.dyndns.org/





Re: SVGs with alpha channel transparency

2006-06-20 Thread John Pye

Hi Jean-Pierre,



  Re: Lyx 1.4.0pre3 + SVG + pdflatex

Georg Baum
Tue, 31 Jan 2006 00:56:43 -0800

Alfonso Gazo wrote:

> After, when generating the PDF file, it produces a messy graphic just in
> the place the SVG graphic should be. I've found that LyX is somewhat
> converting from SVG to EPS and then to PNG. Finally, PNG image is
> included in PDF file.

Correct. This is unfortunately hardcoded in LyX.


Is that still true? I take it to mean that I can't bypass LyX's use of 
'convert' in converting my SVG first to a PNG?


Cheers
JP




Jean-Pierre Chretien wrote:

Date: Wed, 21 Jun 2006 01:24:22 +1000
From: John Pye <[EMAIL PROTECTED]>
To: "lyx-users@lists.lyx.org" 
Subject: SVGs with alpha channel transparency

Hi all

What's the right string of tools to embed an SVG with alpha-channel 
transparency into a LyX document so that I get the alpha channel 
appearing right in the end-product PDF file?


I've tried a few combinations such as intermediate EPS and PS file (no 
transparency) and 'convert' (it goes to bitmap so I lose my hard-edged 
lines). I think that I need to go for an 'encapsulated PDF' somehow, 
perhaps using 'rsvg-convert' but so far haven't been able to make it work.


My particular case is contour plot with coloured regions overlaid, 
generated from Matplotlib and hand-edited a little with Inkscape.


Has anyone had some experience with this that they could pass on?
  


There is a thread about SVG in the archive:
http://www.mail-archive.com/lyx-users@lists.lyx.org/msg45269.html

Transparency is not discussed however.

HTH

  


--
John Pye
Department of Mechanical and Manufacturing Engineering
University of New South Wales, Sydney, Australia
http://pye.dyndns.org/



Re: SVGs with alpha channel transparency

2006-06-20 Thread Uwe Stöhr

John Pye wrote:

Is that still true? I take it to mean that I can't bypass LyX's use of 
'convert' in converting my SVG first to a PNG?


You should be able to define a SVG -> PNG converter in LyX's preferences.
If you use Imagemagick's convert utility to do this you probably save 
the alpha channel.

Could you please send my your SVG-file for some tests? Thanks in advance.

regards Uwe


Re: SVGs with alpha channel transparency

2006-06-20 Thread Stephen Harris

John Pye wrote:

Hi Uwe,

This approach (save as PDF from Inkscape) did not give me alpha channel 
transparency in my PDF. For example:


On the left is a PNG exported from Inkscape (or alternatively, generated 
using 'rsvg-convert'. On the right is the PDF exported by Inkscape.


So I'm still stuck with no alpha channel; the only approach still is to 
use a PNG conversion filter, which means blurry figures.


I'm hoping that rsvg-convert's PDF output might do a better job than 
Inkscape's, but haven't succeeded with that (the LyX builtin 'convert' 
convert seems to get in the way for some reason).


Cheers
JP



This is a recommended method I found before:

Alternatively, SVG to EPS or PDF

1. Open with inkscape.
2. Export to png (huge hi-resolution)
3. Open with the GIMP
4. Save as .eps
5. gsview (or linux command) convert to .ps
6. ps2pdf convert .ps to .pdf

Regards,
Stephen


Re: SVGs with alpha channel transparency

2006-06-20 Thread John Pye
Your approach defeats the purpose of using SVG in the first place, and 
will result in much large PDF files that I am currently getting. I 
really want to work out how use my SVG-with-alpha directly in LyX, or at 
least some vector format that will look OK.


I wonder if there's an SVG-to-EPS converter that doesn't something smart 
with regard to alpha channels? It would need to flatten the layers of 
the vector image in a vectorised way, rather than the bitmapped way that 
most renderers no double work.


Perhaps I just need to give up on the alpha-channel idea...

Cheers
JP

Stephen Harris wrote:

John Pye wrote:

Hi Uwe,

This approach (save as PDF from Inkscape) did not give me alpha 
channel transparency in my PDF. For example:


On the left is a PNG exported from Inkscape (or alternatively, 
generated using 'rsvg-convert'. On the right is the PDF exported by 
Inkscape.


So I'm still stuck with no alpha channel; the only approach still is 
to use a PNG conversion filter, which means blurry figures.


I'm hoping that rsvg-convert's PDF output might do a better job than 
Inkscape's, but haven't succeeded with that (the LyX builtin 
'convert' convert seems to get in the way for some reason).


Cheers
JP



This is a recommended method I found before:

Alternatively, SVG to EPS or PDF

1. Open with inkscape.
2. Export to png (huge hi-resolution)
3. Open with the GIMP
4. Save as .eps
5. gsview (or linux command) convert to .ps
6. ps2pdf convert .ps to .pdf

Regards,
Stephen



--
John Pye
Department of Mechanical and Manufacturing Engineering
University of New South Wales, Sydney, Australia
http://pye.dyndns.org/