Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linear image



The code I sent does seem to work, but the mouse input is difficult to get right. By default it uses image coordinates, while the CI kernel really wants pixels. So I don't know the best way to line up the mouse input with the image, but I've put together a little composition that works except that the mouse position is offset from the image. It uses a video input, but if you don't have a video source replace it with an Image Importer.
--Sam

Attachment: DanTest.qtz
Description: application/quartzcomposer



On Jun 11, 2005, at 5:54 AM, Nick Dan wrote:

Sam,
       I actually just got to that point before I read
your message. This code does produce the desired
output based on the first row of the image however
when moving my mouse up and down the opacity of the
image changes rather than scanning through the y
values. This doesn't make sense to me. Could you try
this and suggest a reason why this happens?

-Nick

--- Sam Kass <email@hidden> wrote:


[...]
kernel vec4 linearImage(sampler image, float ycoord)
{
     // get xy value
     vec2 xy = samplerCoord(image);
     // return image pixels for our column,
specified row
     return sample(image, samplerTransform(image,
vec2(xy.x, ycoord)));
}






Send instant messages to your online friends http:// au.messenger.yahoo.com


Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: Linear image (From: Nick Dan <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.