@plessner - thanks for that - all up and running now.
@omz admin - that's pretty much exactly what I was after - very much appreciated.
Regards,
Bruce
Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
@plessner - thanks for that - all up and running now.
@omz admin - that's pretty much exactly what I was after - very much appreciated.
Regards,
Bruce
So I'm trying to do something like the following script:
import photos, console
from objc_util import *
CIFilter, CIImage, CIContext, CIDetector, CIVector = map(ObjCClass, ['CIFilter', 'CIImage', 'CIContext', 'CIDetector', 'CIVector'])
imo = photos.pick_image()
img = ObjCClass('CIGaussianBlur').imo
img.show()
Unfortunately I'm obviously not getting the syntax correct, as it fails, and I can't find a simple example of what I want to do - just run a filter, with parameters I specify, on an image I pick from the photo album.
Can anyone help?
Hi plessner14. The photo editor script fails when I try and run it - 'no module named toolz' (line 5).
Regards,
Bruce
Thanks for that - trying to figure it out now - steep learning curve!
Hi all. Non-programmer here. I've been using pythonista to process photos of student work, to remove the background and shadows etc. It is working fairly well, however, it is incredibly slow if I use full resolution photos. I thought I might be able to speed things up by using ObjC and CoreImage Filters, however, I have no idea how to get started using ObjC within Pythonista, other than what is shown in the sample script Camera Scanner.py, which is significantly past my understanding.
Can anyone give me an idea on how to get started? I'm happy to experiment with different filters, just not sure how to get a filter actually working and have an image file outputted.
My original Pythonista script is very simple - just a series of filters (I use the workflow app to get the photos into Pythonista, then the cleaned up photos are PDFed so I can open them in Notability to annotate, to send back to my students (highschool Chemistry)).
Any help would be much appreciated!
Original Script:
from PIL import Image, ImageOps, ImageFilter, ImageChops
import photos, clipboard, webbrowser
imo=clipboard.get_image(idx=0)
if not imo.mode == 'RGB':
img=imo.convert('RGB')
im1=img.filter(ImageFilter.MaxFilter(size=9))
im2=ImageChops.subtract(im1,img)
im3=ImageOps.invert(im2)
im4=im3.filter(ImageFilter.SHARPEN)
im5=ImageOps.autocontrast(im4,cutoff=1)
clipboard.set_image(im5,jpeg_quality=1.0)
webbrowser.open('workflow://')