Re: Mathematica graphics Import
- To: mathgroup@smc.vnet.net
- Subject: [mg12457] Re: [mg12425] Mathematica graphics Import
- From: Sean Ross <seanross@worldnet.att.net>
- Date: Tue, 19 May 1998 13:31:26 -0400
- References: <199805141515.LAA03951@smc.vnet.net.>
Ray Pendergraph wrote: > > I am trying to import standard graphics files into Mathematica using > ReadList. Mathematica wants only the raw matrix data though. Do I have > to write a simple program to extract the data to a readable (by > Mathematica) format or is there some utilities. Does anyone have an > easier way to do this? Thankyou in advance. > > Ray Pendergraph > appeal@mindspring.com If, by "standard graphics files" you mean bitmaps, tif files, gif files etc., then there is no built-in way to get the data out of them, if by data, you mean the raw values in either gray level or RGB of each pixel. Enter the wonderful shareware program paintshop pro (www.jasc.com) which contains converters for 30+ graphics formats. You can also save the graphics files in RAW, PPM (portable pixel map) or PGM (portable gray map) and read them in with ReadList. With a little creativity on the ReadList formatting, you can extract the data. There is also a package out on Mathsource which reads TIFF files, but it requires another package which speeds up the reading of binary files which, last time I heard, doesn't work under Win95. Personnally, I think graphics->data conversion ought to be built into Mathematica, especially in light of the now infamous "cat picture" on page 9 of the Mathematica book. The advertising certainly suggests quite strongly that some kind of graphics conversion subroutines are built in to Mathematica. Such is not the case, but we have discovered the work-around.
- References:
- Mathematica graphics Import
- From: Ray Pendergraph <appeal@mindspring.com>
- Mathematica graphics Import