Import, OCR & Delete applescript not working for HEIC format

When I save a png or jpg to a folder using the folder action from your scripting library for Import, OCR & Delete, it works, but if the file is the now native Apple Photos format HEIC, the script does not appear to work… Nothing is imported. When watching Console while attempting to trigger the folder action, I see this error (essentially bad image format?):

Is there some workaround or fix?

Thanks

HEIC are not supported by the OCR engine (or many other things). I suggest you only use exported files.

Thanks for the reply.

So I figured out a way to do what I want. When you export from Photos to Files on iOS, it now exports in .HEIC … I want to save images to a folder and have DTP OCR the image.

I set up a two stage process. one folder action basically converts the HEIC to png, and moves the png to the second folder which has the import, OCR & delete folder action.

A bit convoluted, but it works!

side note… I used imagemagick to do the HEIC -> png conversion, and had to reinstall imagemagick with heif support:


brew uninstall imagemagick && brew install imagemagick --with-libheif

@sarima: Glad you got something working. Nice!