Copy Text from Image - #2368
Open
iainx wants to merge 1 commit into
Open
Conversation
Add a button to the media edit view that uses VisionKit to analyse the image and use any text found as the image description.
jadetheda
pushed a commit
to jadetheda/IceCubesApp
that referenced
this pull request
Sep 6, 2026
This commit ports PR Dimillian#2368 from upstream (@ianinx), allowing users to automatically extract and copy text from media attachments to use as alt text descriptions. Features: - Imported `VisionKit` and added a `Copy text from image` button to `MediaEditView`. - Implemented `generateText(url:)` which passes the downloaded image from `ImagePipeline` to `ImageAnalyzer` for optical character recognition. - Fully guarded the VisionKit invocation behind `#if canImport(VisionKit) && !os(visionOS)` to prevent compiler failures on visionOS targets. - Injected the missing `status.editor.media.copy-text` localization keys.
jadetheda
pushed a commit
to jadetheda/IceCubesApp
that referenced
this pull request
Sep 6, 2026
This commit ports PR Dimillian#2368 from upstream (@ianinx), allowing users to automatically extract and copy text from media attachments to use as alt text descriptions. Features: - Imported VisionKit and added a Copy text from image button to MediaEditView. - Implemented generateText(url:) which passes the downloaded image from ImagePipeline to ImageAnalyzer for optical character recognition. - Fully guarded the VisionKit invocation behind #if canImport(VisionKit) && !os(visionOS) to prevent compiler failures on visionOS targets. - Injected the missing status.editor.media.copy-text localization keys.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a button to the media edit view that uses VisionKit to analyse the image and use any text found as the image description.
It doesn't use the live text feature for two reasons
Imageand using aUIImageViewin the place of theImagedidn't work easily to match the current designWith these reasons I thought just adding a second button was the easiest option.