Re: Q: Use getImageSize() on image data from email?

From: Date: Thu, 01 Jan 1970 00:00:00 +0000
Subject: Re: Q: Use getImageSize() on image data from email?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-127196@lists.php.net to get a copy of this message
On Thu, 5 Dec 2002, Mans Jonasson wrote: > Hi all, > I am trying to use getImageSize() on imagedata I am receiving in an > e-mail and collecting with imap_fetchstructure() et al. What I have in > my $image variable is just the actual image data - no headers or > anything, and of course getImageSize() doesn't work that way. (snip) The imageCreateFromString() function may help you here, this is exactly what it's for. Unfortunately many people have had trouble with it. In your situation, I'd write the thing out to a temporary file. In that case I'd consider using ImageMagick's identify command rather than getImageSize(), since it handles many more image types. Depending on what you need you may find the -verbose option helpful, as it gives tons of information, but is slow... -- Morgan Hughes C programmer and highly caffeinated mammal. kyhm@kyhm.com ICQ: 79293356

« previous php.general (#127196) next »