Skip to content

Choose photos from files, and decode large photos at a safe size - #8

Merged
mattintech merged 1 commit into
developfrom
file-picker
Nov 2, 2026
Merged

mattintech merged 1 commit into
developfrom
file-picker

Conversation

@mattintech

Copy link
Copy Markdown
Owner

Some photos can't be picked from the gallery, so the system file picker is now offered as well.

  • Front and back cards: the photo button asks "From gallery" or "From files". There isn't room for a third button on narrow screens such as the Fold cover display.
  • Visas: enter the label, tap Next, then choose Take photo, Choose from gallery or Choose from files.
  • Extra pages: the "Add page" and "Page N added" dialogs offer all three.
  • Folder photo: the sheet has Camera, Gallery and Files.
  • + PDF: uses the system file picker filtered to PDFs (OpenDocument), where before it used GetContent with any file type.

Also, picked and captured photos were decoded at full resolution before being scaled down, and a 200 MP photo needs about 800 MB. OrientedBitmap.decodeForEdge now subsamples while decoding, so the result is only a little larger than the size that's kept. It's used by the crop screen, folder photos and metadata stripping.

Tested on a Galaxy Z Fold7: the file picker works for document photos.

… a safe size

Photos can now come from Android's file picker as well as the gallery: front and back
cards, visas, extra pages and folder photos. + PDF uses the file picker filtered to PDFs.

Gallery photos were decoded at full resolution before being scaled down; a 200 MP photo
needs about 800 MB. They're now decoded at about the size that's kept.
@mattintech
mattintech merged commit d65ff62 into develop Nov 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant