hauke96 / GeoNotes

A simple app to create georeferences notes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Store images in database

hauke96 opened this issue · comments

Storing images in the database should remove problems with the images currently located on disk/sd-card, removing them, broken references, leaving garbage behind, performance when opening, etc.

Questions:

  • Will the database be too large?
  • How to get the binary data when a photo was taken?
  • Is this a good idea at all (do some research on this)

When the questions have been answered:

  • Store images in database. A separate table should still be used to store multiple images per note.
  • Migrate all existing images
  • Create an own fragment to show images. Make it slidable to swipe through the images of a note.
  • Export:
    • No drop-down, export-toolbar-button will directly lead to new dialog
    • Create a dialog to choose between certain Options:
      • Format: GPX/GeoJSON
      • Option: With images? (yes/no; default 'no'; choosing 'yes' adds the following options)
        • Option: Images as separate file? (yes/no; default 'yes')
        • Option: Add part of note text to image name? (yes/no; If 'yes', add the first 10(?) characters to image name)
      • Export button with the behavior of the current drop-down items
    • Store note text as title and description to IPTC metadata of the image

If the images should be stored in a separate file (default case), the GeoJSON/GPX only contains the filename. If the images should not be stored separately, then the image is stored as base64 inside the image attribute (in the known HTML format).

In addition you wrote:
"Option: Add part of note text to image name? (yes/no; If 'yes', add the first 10(?) characters to image name)"
Maybe it would be a good idea to write also the content of the Fields "Title" and "description" of the Waypoint Fields where the picture is attached in the jpeg IPTC Metadata [Standard 2022.1] (https://iptc.org/std/photometadata/examples/IPTC-PhotometadataRef-Std2022.1.jpg) fields "Title" and "description" when it will be saved. So the pictures can be searched by Software (Paintprograms or Albumssoftware like Geosetter, Xnview....) at the PC, independent where it is copied or stored.

Thanks for the hint 👍 I added that point to always have this metadata