How are you going to use them? You are either going to read the entire
image into a memory cache, or
else inot a disk file. Also, I'm not convinced that JPEG images
always report the correct real size.
Besides, as far as I know, none of the JPEG standard formats (JFIF,
EXIF, etc) report the size of the image in the image data.
Are you sure you are thinking of JPEG encoded image files?
JPEG formats follow this pattern:
SOI
SOF0
SOF2
DHT
DQT
DRI
SOS
RSTn
APPn <---- maybe size is in here, but this is application dependent,
and also near the end of the image!
COM
EOI
-Paul
On Mar 31, 2009, at 12:50 PM, Joe Strout wrote:
Tim Jones wrote:
The images (always jpegs) are available on a web site.
Yes, but to use them, you need to copy the (at least temporarily)
to the local system. You can then access them to determine the
properties. So in that case, they become disk files.
But there's no need for that. Open a socket, get the first few
bytes (for suitable values of "few"), and parse them to obtain the
desired information (image width and height). It seems very
wasteful to involve the disk here.
Best,
- Joe
--
Joe Strout
Inspiring Applications, Inc.
http://www.InspiringApps.com
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|