On 4 Aug 2008, at 21:10, Alessandro Sabatelli wrote:
Create an object:
var myObject = new Object()
Then add the image and the brightness, which you can compute
externally:
That's the point though:
he wants to compute the brightness IN Quartz Composer.
a|x
http://machinesdontcare.wordpress.com
myObject.image = image
myObject.brightness = brightness
Then store the image in an array
myArray[index] = myObject
Once you've downloaded and processed all of the images then sort
myArray.sort(f)
Where f simply compares the brightness
function f(a, b) {
return a.brightness-b.brightness
}
Here's an example which shows it working:
<Brightness Sort.qtz>
.xX
On Aug 3, 2008, at 1:58 PM, aienn wrote:
On Aug 4, 2008, at 12:12 AM, Alessandro Sabatelli wrote:
You can store the average brightness along with the image and then
return the sorted list of images from JS.
Yep, I already figured out the JS and averaging stuff, but how
exactly do I store the average brightness along with the image, as
you're suggesting?
a.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list ([email protected]
)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/the_voder%40yahoo.co.uk
This email sent to [EMAIL PROTECTED]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]