Using the code below, and calling the routine with a *.jpg file. Why does
the mime_type return text/plain? I've also tried using MIME::Head-read
with a filehandle and it returns the same. I would investigate CPAN further
for clues (and the examples that ActivePerl decided not to include), but it
At 13:27 22/05/01 +0100, you wrote:
I don't know if you are parsing mail or something else, but in the past I've had luck
with MIME::Parser using the effective_type() method to get the mime type out of emails.
If you are trying to figure it out magically based on just the file format or
From: Dominic Mitchell [EMAIL PROTECTED]
Dunno about your MIME problem (sorry), but somebody on irc mentioned
trying cpan2.org instead.
Ahh! Got it. Thanks.
Found the following:
Due to nonuniqueness of MIME encodings, there is a very good chance
that your output will not Iexactly resemble
From: Jonathan Peterson [EMAIL PROTECTED]
I don't know if you are parsing mail or something else,
Isolated file.
If you are trying to figure it out magically based on just the file format
or filename or
something (e.g. just pointing it at a raw jpeg) I didn't think MIME::
would help.
Could
I don't know if you are parsing mail or something else,
Isolated file.
If you are trying to figure it out magically based on just
the file format
or filename or
something (e.g. just pointing it at a raw jpeg) I didn't
think MIME::
would help.
Unfortunately I have to rely on
On or about Tue, May 22, 2001 at 02:48:17PM +0100, Robert Thompson typed:
Open up the file, read in the first few bytes and grab the magic number.
Most types of binary file have a marker of some kind to designate what they
are. Any half decent book on graphics programming should be able to tell
From: Roger Burton West [mailto:[EMAIL PROTECTED]]
man 1 file
man 5 magic
less /usr/share/misc/magic # on many systems
except anything written my MS of course...
Rob
---
Any views expressed in this message are those of the
From: Robert Thompson [EMAIL PROTECTED]
From: Roger Burton West [mailto:[EMAIL PROTECTED]]
man 1 file
man 5 magic
less /usr/share/misc/magic # on many systems
except anything written my MS of course...
Which is precisely what this install of ActivePerl sits on. Luckily I have a
This site contains info about the raw file formats of numerous graphic
types, including sig/header block formats. All useful for anyone wanting to
play with graphics.
http://www.dcs.ed.ac.uk/~mxr/gfx/
Rob
---
Any views expressed in
On Tue, May 22, 2001 at 03:06:39PM +0100, Barbie wrote:
From: Robert Thompson [EMAIL PROTECTED]
From: Roger Burton West [mailto:[EMAIL PROTECTED]]
man 1 file
man 5 magic
less /usr/share/misc/magic # on many systems
except anything written my MS of course...
Which is
Robert Thompson wrote:
This site contains info about the raw file formats of numerous graphic
types, including sig/header block formats.
And there's always http://www.wotsit.org/ The Programmer's File Format
Collection.
Cheers,
Philip
--
Philip Newton [EMAIL PROTECTED]
All opinions are my
From: Dominic Mitchell [EMAIL PROTECTED]
On Tue, May 22, 2001 at 03:06:39PM +0100, Barbie wrote:
From: Robert Thompson [EMAIL PROTECTED]
From: Roger Burton West [mailto:[EMAIL PROTECTED]]
man 1 file
man 5 magic
less /usr/share/misc/magic # on many systems
except
12 matches
Mail list logo