MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: To be or not to be an image file

  • To: mathgroup at smc.vnet.net
  • Subject: [mg31381] Re: To be or not to be an image file
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Wed, 31 Oct 2001 19:59:01 -0500 (EST)
  • Organization: Universitaet Leipzig
  • References: <9rodn2$ptf$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

what is a vaild image file for you ?
The most of the image files have a character
sequence (terminated by Crtl-Z) at the begin
of the file that say "I'm format xyz",

PNG files start with "PNG",
GIF start with "GIF98"

Linux has a allmost complete list of these
file indentifyers in it's printing system
and you should look on a linux installation
how the lp command figure out that it has to
usre ImageMagic to print 

lp someimage.tif

BTW what's wrong with the Import["file.bmp"] 
version ?

Regards
  Jens

Simon Krogh wrote:
> 
> Hi!
> I want to use Mathematica to do some image processing. I got stuck while
> making a function that returns true if a file is a valid image file (bmp,
> jpg, gif etc.) and false otherwise. My first thought was to test the return
> of the Import["file.bmp"] command but it just won't work. Any ideas?
> 
> --
> ----------------------------------
> Simon Long Krogh
> http://brumdron.subnet.dk eller
> http://hjem.get2net.dk/finn2/brumdron


  • Prev by Date: AW: graphics on the same line
  • Next by Date: Re: graphics on the same line
  • Previous by thread: To be or not to be an image file
  • Next by thread: select data in formatted datafiles