[prev in list] [next in list] [prev in thread] [next in thread]
List: imagemagick-developer
Subject: [magick-developers] RE: [magick-users] Convert SVG txt string to
From: "Hugh Brackett" <ebrackett () citi-us ! com>
Date: 2003-07-25 16:42:55
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Stick your SVG file in a blob and pass that instead of a string. The Objeckt
will notice it got a blob
instead of a string and pull your file out. ImageMagick shouldn't have any
trouble figuring out that
it is SVG.
Note I couldn't get blobs to work right on NT 4.0 but it worked fine on
Win2K. I did not have time to
investigate.
-----Original Message-----
From: magick-users-bounces@imagemagick.org
[mailto:magick-users-bounces@imagemagick.org]On Behalf Of John Clarke
Sent: Thursday, July 24, 2003 1:19 PM
To: magick-users@imagemagick.org; magick-developers@imagemagick.org
Subject: [magick-users] Convert SVG txt string to PNG/JPG
withImageMagickObject API
Is there away to send a text string of valid SVG instead of a reference to
a SVG file as a source image? I want to convert SVG to PNG or JPG using the
ImageMagickObject COM object without writing the SVG to a file.
I read the WSH array example included in the [ImageMagickObject\test]
directory and tried to adapt it to SVG without any success. The example
seems to import binary information, and I need to be able to import text
(SVG is text).
Any help would be MUCH appreciated!
-John Clarke
john@clarkent.com
----------------------------------------------------
Clarkent
Information Management Consultants
Conseillers en informatique d'affaires
www.clarkent.com
[Attachment #5 (text/html)]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content=Word.Document name=ProgId>
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<META content="Microsoft Word 9" name=Originator><LINK
href="cid:filelist.xml@01C351E6.299D04B0" rel=File-List><!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:DoNotRelyOnCSS/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:DocumentKind>DocumentEmail</w:DocumentKind>
<w:EnvelopeVis/>
</w:WordDocument>
</xml><![endif]-->
<STYLE>@font-face {
font-family: Tahoma;
}
@font-face {
font-family: Verdana;
}
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; \
mso-header-margin: .5in; mso-footer-margin: .5in; mso-paper-source: 0; } P.MsoNormal \
{ FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; \
mso-ansi-language: FR-CA; mso-style-parent: ""; mso-pagination: widow-orphan; \
mso-fareast-font-family: "Times New Roman" }
LI.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; \
mso-ansi-language: FR-CA; mso-style-parent: ""; mso-pagination: widow-orphan; \
mso-fareast-font-family: "Times New Roman" }
DIV.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; \
mso-ansi-language: FR-CA; mso-style-parent: ""; mso-pagination: widow-orphan; \
mso-fareast-font-family: "Times New Roman" }
A:link {
COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline; text-underline: single
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline; text-underline: single
}
P.MsoAutoSig {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; \
mso-ansi-language: FR-CA; mso-pagination: widow-orphan; mso-fareast-font-family: \
"Times New Roman" }
LI.MsoAutoSig {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; \
mso-ansi-language: FR-CA; mso-pagination: widow-orphan; mso-fareast-font-family: \
"Times New Roman" }
DIV.MsoAutoSig {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; \
mso-ansi-language: FR-CA; mso-pagination: widow-orphan; mso-fareast-font-family: \
"Times New Roman" }
PRE {
FONT-SIZE: 10pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Courier New"; mso-pagination: \
widow-orphan; mso-fareast-font-family: "Courier New" }
SPAN.EmailStyle15 {
COLOR: black; mso-style-type: personal-compose; mso-ansi-font-size: 10.0pt; \
mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: \
Arial }
SPAN.postbody1 {
LETTER-SPACING: 16.85pt; mso-ansi-font-size: 11.0pt; mso-style-name: postbody1; \
mso-bidi-font-size: 11.0pt }
DIV.Section1 {
page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-US style="tab-interval: .5in" vLink=purple link=blue>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=540413316-25072003>Stick
your SVG file in a blob and pass that instead of a string. The Objeckt will
notice it got a blob</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=540413316-25072003>instead of a string and pull your file out. ImageMagick
shouldn't have any trouble figuring out that</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=540413316-25072003>it is
SVG.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=540413316-25072003>Note I
couldn't get blobs to work right on NT 4.0 but it worked fine on Win2K. I did
not have time to</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=540413316-25072003>investigate.</SPAN></FONT></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; \
MARGIN-RIGHT: 0px"> <DIV class=OutlookMessageHeader dir=ltr align=left><FONT \
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
magick-users-bounces@imagemagick.org
[mailto:magick-users-bounces@imagemagick.org]<B>On Behalf Of </B>John
Clarke<BR><B>Sent:</B> Thursday, July 24, 2003 1:19 PM<BR><B>To:</B>
magick-users@imagemagick.org;
magick-developers@imagemagick.org<BR><B>Subject:</B> [magick-users] Convert
SVG txt string to PNG/JPG withImageMagickObject API<BR><BR></FONT></DIV>
<DIV class=Section1>
<P class=MsoNormal><SPAN class=postbody1><FONT face=Verdana color=black
size=2><SPAN
style="FONT-SIZE: 11pt; COLOR: black; FONT-FAMILY: Verdana; LETTER-SPACING: 0pt; \
mso-ansi-language: EN-US">Is there away to send a text string of valid SVG <I><SPAN \
style="FONT-STYLE: italic">instead</SPAN></I> of a reference to a SVG file as
a source image? I want to convert SVG to PNG or JPG using the
ImageMagickObject COM object without writing the SVG to a
file.</SPAN></FONT></SPAN><SPAN class=postbody1><FONT face=Verdana color=black
size=2><SPAN
style="FONT-SIZE: 11pt; COLOR: black; FONT-FAMILY: Verdana; LETTER-SPACING: 0pt; \
mso-ansi-language: EN-US; mso-color-alt: \
windowtext"><o:p></o:p></SPAN></FONT></SPAN></P> <P class=MsoNormal><SPAN \
class=postbody1><FONT face=Verdana color=black size=2><SPAN
style="FONT-SIZE: 11pt; COLOR: black; FONT-FAMILY: Verdana; LETTER-SPACING: 0pt; \
mso-ansi-language: EN-US"><![if \
!supportEmptyParas]><![endif]> </SPAN></FONT></SPAN><SPAN \
class=postbody1><FONT face=Verdana color=black size=2><SPAN style="FONT-SIZE: 11pt; \
COLOR: black; FONT-FAMILY: Verdana; LETTER-SPACING: 0pt; mso-ansi-language: EN-US; \
mso-color-alt: windowtext"><o:p></o:p></SPAN></FONT></SPAN></P> <P \
class=MsoNormal><SPAN class=postbody1><FONT face=Verdana color=black size=2><SPAN
style="FONT-SIZE: 11pt; COLOR: black; FONT-FAMILY: Verdana; LETTER-SPACING: 0pt; \
mso-ansi-language: EN-US">I read the WSH array example included in the \
[ImageMagickObject\test] directory and tried to adapt it to SVG without any \
success. The example seems to import binary information, and I need to be able to \
import text (SVG is text). </SPAN></FONT></SPAN><FONT face=Verdana color=black \
size=2><SPAN style="FONT-SIZE: 11pt; COLOR: black; FONT-FAMILY: Verdana; \
mso-ansi-language: EN-US"><BR><BR><SPAN class=postbody1><SPAN \
style="LETTER-SPACING: 0pt">Any help would be MUCH \
appreciated!</SPAN></SPAN></SPAN></FONT><SPAN class=EmailStyle15><FONT face=Arial \
color=black size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; \
mso-ansi-language: EN-US; mso-bidi-font-size: \
12.0pt"><o:p></o:p></SPAN></FONT></SPAN></P> <P class=MsoNormal><SPAN \
class=EmailStyle15><FONT face=Arial color=black size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-US; \
mso-bidi-font-size: 12.0pt"><![if \
!supportEmptyParas]><![endif]> <o:p></o:p></SPAN></FONT></SPAN></P> <P \
class=MsoNormal><!--[if supportFields]><font color=black><span \
style='color:black;mso-ansi-language:EN-US'><span \
style='mso-element:field-begin'></span><span style="mso-spacerun: \
yes"> </span>AUTOTEXTLIST \s "E-mail Signature" <span \
style='mso-element:field-separator'></span></span></font><![endif]--><SPAN \
class=EmailStyle15><FONT face=Arial color=black size=1><SPAN style="FONT-SIZE: 9pt; \
FONT-FAMILY: Arial; mso-ansi-language: EN-US; mso-bidi-font-size: 12.0pt">-John \
Clarke<o:p></o:p></SPAN></FONT></SPAN></P> <P class=MsoNormal><SPAN \
class=EmailStyle15><FONT face=Arial color=black size=1><SPAN
style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-ansi-language: EN-US; \
mso-bidi-font-size: 12.0pt"><A \
href="mailto:john@clarkent.com">john@clarkent.com</A><o:p></o:p></SPAN></FONT></SPAN></P>
<P class=MsoNormal><SPAN class=EmailStyle15><FONT face=Arial color=black
size=1><SPAN
style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-ansi-language: EN-US; \
mso-bidi-font-size: 12.0pt">----------------------------------------------------<o:p></o:p></SPAN></FONT></SPAN></P>
<P class=MsoNormal><SPAN class=EmailStyle15><B><FONT face=Tahoma color=#999999
size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: #999999; FONT-FAMILY: Tahoma; \
mso-ansi-language: EN-US; mso-bidi-font-size: \
12.0pt">Clarkent<o:p></o:p></SPAN></FONT></B></SPAN></P> <P class=MsoNormal><SPAN \
class=EmailStyle15><FONT face=Arial color=black size=1><SPAN
style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-ansi-language: EN-US; \
mso-bidi-font-size: 12.0pt">Information Management \
Consultants<o:p></o:p></SPAN></FONT></SPAN></P> <P class=MsoNormal><SPAN \
class=EmailStyle15><FONT face=Arial color=black size=1><SPAN
style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-ansi-language: EN-US; \
mso-bidi-font-size: 12.0pt">Conseillers en informatique \
d'affaires<o:p></o:p></SPAN></FONT></SPAN></P> <P class=MsoNormal><SPAN \
class=EmailStyle15><FONT face=Arial color=black size=1><SPAN
style="FONT-SIZE: 9pt; FONT-FAMILY: Arial; mso-ansi-language: EN-US; \
mso-bidi-font-size: 12.0pt"><A \
href="http://www.clarkent.com/">www.clarkent.com</A><o:p></o:p></SPAN></FONT></SPAN></P>
<P class=MsoNormal><!--[if supportFields]><font color=black><span
style='color:black;mso-ansi-language:EN-US'><span \
style='mso-element:field-end'></span></span></font><![endif]--><FONT \
color=black><SPAN style="COLOR: black; mso-ansi-language: EN-US"><![if \
!supportEmptyParas]><![endif]> </SPAN></FONT><FONT color=black><SPAN
style="COLOR: black; mso-ansi-language: EN-US; mso-color-alt: \
windowtext"><o:p></o:p></SPAN></FONT></P></DIV></BLOCKQUOTE></BODY></HTML>
_______________________________________________
Magick-developers mailing list
Magick-developers@imagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick-developers
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic