LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (February 2010, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 4 Feb 2010 22:18:03 -0500
Reply-To:     Mark D H Miller <mdhmiller@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Mark D H Miller <mdhmiller@GMAIL.COM>
Subject:      Re: How to convert rtf file output(already exist) into any image
              file using SAS
Comments: To: Arthur Tabachneck <art297@NETSCAPE.NET>
In-Reply-To:  <201002050144.o14LhCGI013199@malibu.cc.uga.edu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Satya,

An RTF file is NOT an image file; it is a TEXT file ( RTF <=> Rich Text Format) It may contain imbedded image a variety of image sources, with the image and all of its metadata stored between two markup tags starting " {\pict" and ending at the matching "}" Since it is a tagged format, you could write SAS code to scan the source file and parse out the image components, but converting to an image format other than the one imbedded into the rtf file is a problem probably best solved with some tool other than SAS.

The image format is specified in the RTF coding. The picture itself may appear in the RTF file in a hexadecimal or a binary format. Current supported values of "pictype" are \emfblip | \pngblip | \jpegblip | \macpict | \pmmetafile | \wmetafile | \dibitmap <bitmapinfo> | \wbitmap <bitmapinfo> which correspond to emf ; png ; jpeg ; [mac] pict ; [os2 vs Win] metafile ; [dib vs WinDib bitmap] bmp

Possible followup references

Python discussion group message which gives somewhat more info than above http://mail.python.org/pipermail/tutor/2009-February/067266.html

MS online description of the RTF specification (buried in the Office documentation)

http://msdn.microsoft.com/en-us/library/aa140283%28office.10%29.aspx

http://msdn.microsoft.com/en-us/library/aa140283(office.10).aspx **<<== same as above but parentheses are not coded in url ;

RTF Picture Extractor (VB program to extract images to WMF files -- ++SOURCE ) http://www.tripletee.com/freeutils.htm

Delphi code to save/load images in RTF as PNG (in 2003 native Delphi did not support all guest RTF formats except PNG ++SOURCE)

http://www.trichview.com/support/trichview.support.examples/example_howtosave_loadimagesinrtfaspng.htm Delphi/C++ libs now (2009) support all pre-defined formats allowed in rtf (product = tRichView)

... Mark Miller

On 2/4/2010 8:44 PM, Arthur Tabachneck wrote: > SAS may well be able to do that, but I'm not aware of it having that > functionality. Conversely, this OLD response, from 1991, suggests an > alternative: > > http://www.listserv.uga.edu/cgi-bin/wa?A2=ind0109c&L=sas-l&F=&S=&P=1303 > > HTH, > Art > -------- > On Thu, 4 Feb 2010 09:30:20 -0800, Satya<kondal4uall@GMAIL.COM> wrote: > > >> Hi Friends >> >> How to convert rtf file output(already exist) into any image file >> using SAS >> >> Let know the solution >> >


Back to: Top of message | Previous page | Main SAS-L page