jmliss Posted January 25, 2023 Posted January 25, 2023 See attached PDF file describing the bug and the environment. I show where it doesn't work well with Affinity Photo, but does work well with Pixelmator Pro ...... Affinity Photo Scanner Bug.pdf Quote
jmliss Posted January 25, 2023 Author Posted January 25, 2023 Let me add that scanner from Brother Brother HL-2280DW CUPS seems to work well - and when I tried various combinations for Brother MFC-L2750DW series-AirPrint some importing caused Affinity Photo to actually crash. I believe these bugs are latent for many versions of Affinity Photo. Quote
loukash Posted January 25, 2023 Posted January 25, 2023 (edited) This is a known bug which the Serif engineers allegedly cannot exactly replicate. Acquire from Affinity works for some users, but not for others. All of my three compatible scanners – 2 Epson and 1 HP – are affected, both in Affinity v1 and v2. All three work otherwise. Scanning via Apple's own Image Capture app – which is technically exactly the same process – works always fine. So simply use that instead. To scan via Image Capture directly into Photo, you can create a totally simple Automator plugin, which will pass the scanner input (that is being temporarily saved in a hidden system folder) to open with Photo: Open the Automator app, create a new Image Capture plugin and add at least the Run AppleScript action. Make sure it contains exactly this code: on run {input, parameters} tell application "Affinity Photo 2" activate open input end tell return input end run Save the plugin under a meaningful name like "Open in Affinity Photo" or whatever you like. It will be automatically saved in ~/Library/Workflows/Applications/Image Capture Then open Image Capture, select your scanner and set the Scan To popup menu to the name of your previously created plugin: Then scan. That's all: Make sure to Save As or export into a directory of your choice, as the temporary folder where the interim scan file resides will be eventually cleared. Edited January 25, 2023 by loukash see below Quote MacBookAir 15": MacOS Ventura > Affinity v1, v2, v2 beta // MacBookPro 15" mid-2012: MacOS El Capitan > Affinity v1 / MacOS Catalina > Affinity v1, v2, v2 beta // iPad 8th: iPadOS 16 > Affinity v2
loukash Posted January 25, 2023 Posted January 25, 2023 Actually strike that idea with Automator! It's in fact much easier: in Image Capture, open the Scan To popup menu and select Other… navigate to your Applications folder choose Affinity Photo as your "scan to" app scan That's all! As above though: make sure to Save As or export into a directory of your choice, as the temporary folder where the interim scan file resides will be eventually cleared. Quote MacBookAir 15": MacOS Ventura > Affinity v1, v2, v2 beta // MacBookPro 15" mid-2012: MacOS El Capitan > Affinity v1 / MacOS Catalina > Affinity v1, v2, v2 beta // iPad 8th: iPadOS 16 > Affinity v2
jmliss Posted January 25, 2023 Author Posted January 25, 2023 @loukash, thank you for the idea, I will look into it. I was hoping that by indicating it didn't work for one brother scanner, but yet another it did work, that info might help Affinity. The fact that it works for Pixelmator pro, and perhaps other photo editing apps, should be a stimulus to accelerate a fix. In terms of the "same process", well it might not be the same "environment" - timing, memory management, race conditions, whatever, recursive code if they implement that way. This is an annoying situation, similar to have to work around using nik collection on an apple silicon. Affinity needs to strive for perfection. Quote
jmliss Posted January 25, 2023 Author Posted January 25, 2023 3 minutes ago, loukash said: Actually strike that idea with Automator! It's in fact much easier: in Image Capture, open the Scan To popup menu and select Other… navigate to your Applications folder choose Affinity Photo as your "scan to" app scan That's all! As above though: make sure to Save As or export into a directory of your choice, as the temporary folder where the interim scan file resides will be eventually cleared. there are bugs in the affinity implementation. I sometimes get a -9921 (Failed to open a session on the device) but yet the scanner is running. Perhaps a timing issue. Quote
jmliss Posted January 25, 2023 Author Posted January 25, 2023 2 minutes ago, jmliss said: there are bugs in the affinity implementation. I sometimes get a -9921 (Failed to open a session on the device) but yet the scanner is running. Perhaps a timing issue. And yes, your simpler idea worked for me, image scan -> affinity photo 2 - thanks for thinking out of the box Quote
loukash Posted January 25, 2023 Posted January 25, 2023 17 minutes ago, jmliss said: In terms of the "same process", well it might not be the same "environment" Hm, that's all negligible. Affinity just plugs into the existing MacOS API. The thing is that apparently they messed something up on the way and can't figure out what exactly. 13 minutes ago, jmliss said: your simpler idea worked for me, image scan -> affinity photo 2 In fact you can "close the circle" so to speak, and make use of an Automator Quick Action to open Image Capture directly from Photo via the Services menu – and thus also available via keyboard shortcut. So in the end, the workflow will be virtually identical to the Acquire command, except that it actually works. And it works like a charm. Quote MacBookAir 15": MacOS Ventura > Affinity v1, v2, v2 beta // MacBookPro 15" mid-2012: MacOS El Capitan > Affinity v1 / MacOS Catalina > Affinity v1, v2, v2 beta // iPad 8th: iPadOS 16 > Affinity v2
jmliss Posted January 25, 2023 Author Posted January 25, 2023 I see. Of course I can try, but my question is, will this create a new layer in the open tab or a new AP tab ? Quote
loukash Posted January 25, 2023 Posted January 25, 2023 15 minutes ago, jmliss said: will this create a new layer in the open tab or a new AP tab ? It will be a new image file, not "Untitled" as from Acquire Image. The major difference is that you can select the format you're scanning to and define the file name before scanning. If you're scanning to TIFF (or PNG, unless your scanner support features that PNG can't do), the scan will be just as lossless as with Acquire Image. 31 minutes ago, jmliss said: sometimes get a -9921 (Failed to open a session on the device) I'm seeing this with the HP (LaserJet MFP M28w) as well. It's connected via AirPrint. The error usually appears when the MacOS "advanced" Network settings for some unknown reason disable IPv6. So I have to enable IPv6 manually again, then it works. Quote MacBookAir 15": MacOS Ventura > Affinity v1, v2, v2 beta // MacBookPro 15" mid-2012: MacOS El Capitan > Affinity v1 / MacOS Catalina > Affinity v1, v2, v2 beta // iPad 8th: iPadOS 16 > Affinity v2
jmliss Posted January 25, 2023 Author Posted January 25, 2023 Well, I view it more as a timing bug in and around the api call, because if I wait a few seconds, click again, or switch to another scanner and then back, it works. That is why I said earlier that the environment in and around calling the api is different. Anyway, your second suggestion, simply outputting image capture to AP2 is fine. Doing it twice creates a 2nd tab which is ok, so the image can be modified, then copy/pasted to the first tab. This is a good enough solution for me and it is out of the box, w/o having to create custom code (automator) that perhaps can break in a future OS upgrade. AP needs to fix the underlying issue as the fix might expose other issues. I can make Affinity Publisher crash for example and had to identify work arounds - so what I'm saying is that their qualification/system test processes need to be enhanced - yes, every piece of code has a bug, its just a matter of time for it to be exposed ..... loukash 1 Quote
jmliss Posted January 25, 2023 Author Posted January 25, 2023 31 minutes ago, loukash said: It will be a new image file, not "Untitled" as from Acquire Image. The major difference is that you can select the format you're scanning to and define the file name before scanning. If you're scanning to TIFF (or PNG, unless your scanner support features that PNG can't do), the scan will be just as lossless as with Acquire Image. I'm seeing this with the HP (LaserJet MFP M28w) as well. It's connected via AirPrint. The error usually appears when the MacOS "advanced" Network settings for some unknown reason disable IPv6. So I have to enable IPv6 manually again, then it works. My MAC OS Ventura Network->wifi->TCP/IP->Configure IPv6 is set to "Automatically" - I'm not sure why this would change, perhaps a function of the modem/router ? I have a mesh network. I'm only guessing now. But as I said, if I wait some time, that error message goes away and it eventually works. I suspect we (you) beat this to death with your image capture -> AP2 suggestions - as I am now a happy camper. loukash 1 Quote
Martin S Taylor Posted June 10 Posted June 10 On 1/25/2023 at 7:04 PM, loukash said: Actually strike that idea with Automator! It's in fact much easier: in Image Capture, open the Scan To popup menu and select Other… navigate to your Applications folder choose Affinity Photo as your "scan to" app scan That's all! As above though: make sure to Save As or export into a directory of your choice, as the temporary folder where the interim scan file resides will be eventually cleared. Either this is no longer working or I'm misunderstanding. When I do this, it puts the scanned file into the Package which is Affinity Photo 2. It does what you say when I scan it to Preview or Photos or other system apps. Could this be because Affinity Photo 2 has me as the owner, not 'system'? MST Quote
loukash Posted June 10 Posted June 10 5 hours ago, Martin S Taylor said: When I do this, it puts the scanned file into the Package which is Affinity Photo 2. This would be certainly very odd. For me, it saves the intermediate scan into a /private/var/folders/(…) subdirectory which is for temporary files. That's on MacOS Ventura. Haven't tried on newer OS though. 5 hours ago, Martin S Taylor said: Could this be because Affinity Photo 2 has me as the owner, not 'system'? I don't think so. I'm the owner, too. That said, I vaguely remember having seen similar behavior before as well. But I don't remember in which context it was or if it was with Affinity or another app. Some 3rd party apps can definitely get confused by the MacOS "app package" concept and treat them as regular folders. Quote MacBookAir 15": MacOS Ventura > Affinity v1, v2, v2 beta // MacBookPro 15" mid-2012: MacOS El Capitan > Affinity v1 / MacOS Catalina > Affinity v1, v2, v2 beta // iPad 8th: iPadOS 16 > Affinity v2
Martin S Taylor Posted June 10 Posted June 10 Ah! Sorted! I needed to reboot both the scanner and the Mac and now it works. Thanks! MST Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.