Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Siri Shortcuts #77

Open
prolost opened this issue Apr 24, 2019 · 6 comments
Open

Support for Siri Shortcuts #77

prolost opened this issue Apr 24, 2019 · 6 comments
Labels
enhancement New feature or request help wanted Extra attention is needed ios

Comments

@prolost
Copy link

prolost commented Apr 24, 2019

Would it be possible to create Siri Shortcuts through actions that would allow the various Core Image filters to be applied to images?

The way I imagine this working is that, with the app installed, you could pass an image to a CIFilter.io action that would allow you to select from the various filters and specify the parameter values. The output would be the processed image.

In this way CIFilter.io would turn Siri Shortcuts into a powerful, scriptable image processing engine.

@noahsark769
Copy link
Owner

noahsark769 commented Apr 25, 2019

I like this idea! I'm not that familiar with Siri Shortcuts but this might be a great time to try them out. @prolost would you have to start with an "Add To Siri" button, or would there be a way for the app to publish 1 "action" per available filter?

@noahsark769 noahsark769 added enhancement New feature or request help wanted Extra attention is needed ios labels Apr 25, 2019
@prolost
Copy link
Author

prolost commented Apr 26, 2019

Glad you like the idea! I'm not exactly sure how this all works, but I think you can create one Action that would allow you to choose from the various filters, and configure that action to show the correct parameters for the chosen filter. I've seen that with some first- and third-party Actions.

If you want to learn more, I recommend you take a look at Drafts, Overcast, Bear, and Things for examples of apps with rich Siri actions.

Also this is a great article describing how PCalc uses the system clipboard to get around some limitations with Shortcuts.

I'm thinking this clipboard might be a way for you to pass image data back and forth with Shortcuts. You might be able to pass an image from Shortcuts to CIFilter.io through the action, but I'm getting the sense that to get an image back you may have to put it in the clipboard.

@noahsark769
Copy link
Owner

This shortcut seems to pass an image as an output, so maybe it's doable in some way - not sure if they're using clipboard hackery or not. Seems pretty viable to export one action for each filter from the CIFilter.io app

@prolost
Copy link
Author

prolost commented May 15, 2019

Hey, sorry for the delay in replying. Yes, Shortcuts can most certainly take images as input and provide them as output. And to build such shortcuts, you use built-in Actions that do the same (Crop, Overlay, Mask, etc.). What I wasn't sure about was whether third parties could create such Actions. Have you had any luck exploring this?

@prolost
Copy link
Author

prolost commented Jul 7, 2019

Hi again! I don't know if you've been following the iOS 13 developments WRT Shortcuts, but it looks like Apple has made a big change that should allow what I'm suggesting here to work. The feature is called "Parameters," and it seems to allow 3rd party Actions to take any kind of input and return any kind of output, including images.

https://twitter.com/stroughtonsmith/status/1136316933505265665

https://developer.apple.com/videos/play/wwdc2019/213/

https://thesweetsetup.com/all-the-new-things-in-shortcuts-for-ios-13/

I hope this helps!

@noahsark769
Copy link
Owner

Yep, I think that's exactly what we'd want here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed ios
Projects
None yet
Development

No branches or pull requests

2 participants