site_archiver@lists.apple.com Delivered-To: pro-apps-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id; bh=myue/xl2RytI9BgEOVGG+kPl8+gu7kQL1W7RXFBFwlQ=; b=fwprwtpzULUK1I6E4aqIQT6R9j3SVt3fvC35wpBgu4Z7Qk2opfhLodThE3yPuCL2LN uZsV39KX/D5usm6YiD72PJ+d1PwZUvBhUSMnCusOFPLi5zEx+XxPiF8P2tq5jLTsoVLZ AwsVn7IiXT6p/zSQ2kf9E6VYZazERyKycZZ7msXiMSDQgx7bXfwSnP1P23oduPWMCz4A Nr7XrOjATcSPfzrS7PRMVFDbwPnQM+V9Duh1IF/98nknlsv9f72ryPhrUHD1a0MjYXTJ IBccm4zBcxfaBYobJQix5+OBAM8tOyeAM0dlImhgrCpGZXcfJBz3/HPypvnRSccHc/Op YFUA== You want picker to return values in the correct colour space e.g. input image. Grabbing values from input texture / bitmap in renderOutput:withInput:withInfo: works for me. You need OSC plugin to let user choose position to pick and then convert display to image coordinates as you’ve said. Latest API allows to set custom cursor which is a bonus. Best Regards, Dmitry
Date: Wed, 7 Jun 2017 22:12:42 -0700 From: Dave Howell To: pro-apps-dev@lists.apple.com Subject: Color picker question Message-ID: <5BA1ACD2-37A7-4783-84A7-F05DFF0CFE07@avatron.com> Content-Type: text/plain; charset=utf-8
Hopefully everybody is at WWDC getting inspired about tvOS or something, and this will get a slow response.
Anyway, I have an FxPlug with a custom UI. It’s most beautiful.
The custom UI features an eye-dropper color-picker button. When you click it, I want to then let you go click on the canvas with an eyedropper to select a point, thereby selecting a color. Then I’ll use that color value for my own nefarious purposes.
The brute force implementation would be to just grab a color from the screen, using an image from the API CGDisplayCreateImage( CGMainDisplayID() ). I could do that, but then you might be selecting colors from a graphic overlay or something, and I won’t be doing a smart filtered sample from the full resolution of the movie.
Another approach would be implement a sort of dummy FxOnScreenControlAPI, so I can convert between screen coordinates and canvas coordinates, and then request the pixel values from some host API.
Any recommendations for how to implement a color picker? Should I just grab the pixel value from the screen, or is there a more elegant solution?
Cheers, Dave
_______________________________________________ Do not post admin requests to the list. They will be ignored. Pro-apps-dev mailing list (Pro-apps-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/pro-apps-dev/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Dmitry Lavrov