Skip to content
This repository has been archived by the owner on Feb 25, 2021. It is now read-only.

Take photo of current video feed #52

Closed
Vortec4800 opened this issue Oct 8, 2015 · 5 comments
Closed

Take photo of current video feed #52

Vortec4800 opened this issue Oct 8, 2015 · 5 comments
Labels

Comments

@Vortec4800
Copy link

In my particular use-case, I'd like to capture and save a photo of the scanned barcode. My plan was to freeze the feed, save the photo and then unfreeze the feed again.

I can do this with a screenshot, but I'd rather save the actual photo from AVFoundation. If I create a pull request that does this and expose it via a single captureFrame method, is that something you would want to merge into the library?

@mikebuss
Copy link
Owner

mikebuss commented Oct 8, 2015

Hey @Vortec4800 - this sounds like a great feature. If you have the time to implement it, I'd be happy to merge it in.

When developing this, keep in mind a new feature was added a few hours ago by @peterpaulis allowing the user to capture still frames from the camera feed: #51

It sounds like you just want to capture the barcode itself, so this may or may not be helpful.

Since you'd like the ability to capture images of codes as they're scanned, you might implement another callback block that's called in captureOutput:didOutputMetadataObjects:fromConnection: that reports back images of all the scanned codes. If so, I think it's important the user can distinguish which image belongs to which code.

I'm open to ideas though. What are your thoughts on the implementation?

@Vortec4800
Copy link
Author

Interesting - actually #51 is exactly what I was looking for. I'm using the Cocoapod and didn't see it in the header file so I had assumed this wasn't implemented.

My preference is to capture the entire frame instead of only the barcode, so the user has context later on when viewing it again. If I do decide to only capture the barcode itself then I will return and re-evaluate.

@mikebuss
Copy link
Owner

mikebuss commented Oct 8, 2015

Gotcha - sounds good. I may end up implementing this anyway in the next few weeks. If I do, I'll update this ticket.

Because the feature was only merged in a few hours ago, I haven't pushed a new version yet. Since it sounds like you need it, I'll push that in the next few minutes. Thanks!

@Vortec4800
Copy link
Author

That sounds great. Thank you!

@mikebuss
Copy link
Owner

mikebuss commented Oct 8, 2015

@Vortec4800 this should now be in 1.8.6. Happy scanning!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants