realbasic-nug
[Top] [All Lists]

Re: Getting image data

To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Subject: Re: Getting image data
From: Tim Jones <tjmac@tolisgroup.com>
Date: Tue, 31 Mar 2009 11:45:49 -0700
Authentication-results: mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com
Delivered-to: listarchive@realsoftware.com
In-reply-to: <49D257D6.5020307@inspiringapps.com>
References: <3753b0ed0903310421h6e2ea82dg8e21f6d054e123d3@mail.gmail.com> <49D22A47.608@inspiringapps.com> <3753b0ed0903310747n228c7763j33890fc403829be6@mail.gmail.com> <55534378039663975067776974302513501206-Webmail@me.com> <3753b0ed0903310937k7e79084by5f9e777ffef381d@mail.gmail.com> <22102D0B-170C-4E67-9F92-AA4B56DCD631@tolisgroup.com> <49D257D6.5020307@inspiringapps.com>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com
On Mar 31, 2009, at 10:50 AM, 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.

My point was that the data would be coming to the local machine if you have any plans on touching it at all, so whether you grab the parameters directly from the stream as Joe suggests or copy the file to the local disk.

Tim


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>