Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Adding editing tools for photos #84

Closed
CodingTurtle2 opened this issue Jun 28, 2024 · 3 comments
Closed

Suggestion: Adding editing tools for photos #84

CodingTurtle2 opened this issue Jun 28, 2024 · 3 comments

Comments

@CodingTurtle2
Copy link
Contributor

It would be great if I could edit my pictures, like paint on the picture or resize it, like it is implemented in the ios photo app.

Since editing photos are unfortunately only present in very few apps on linux, this would be a great addition.

If help is wanted and this suggestion itself would be accepted, I would work on a possible implementation and then provide this as a pull request

@blissd
Copy link
Owner

blissd commented Jun 29, 2024

Hi @CodingTurtle2. Thank you for your suggestion. Editing photos or videos isn't a feature I'm currently looking at, but it isn't something against. However, having said that photo editing is something I'm hesitant about. There are bunch of points to consider for such a feature.

  • Responsibility: Right now all of Fotema's data (its database, thumbnails, and transcoded videos) are "temporary", meaning they can all be deleted and, given some time and CPU power, Fotema can regenerate everything for the user. This gives me, as the developer, a small comfort as I know that I'm not in the position to delete or corrupt anything the user has created. However, as soon as Fotema stores data that the user has authored, then the burden of responsibility in Fotema becomes much greater, and greater care has to be taken to ensure irreplaceable data isn't destroyed.

  • Mobile: I don't have a Linux phone, but I'm keen for all of Fotema's features to be 100% inclusive of small form-factor touch devices. Any photo editing will have to be finger friendly.

  • Permissions: Fotema has read-only access to the user's pictures directory, which I don't want to change to write access (actually, I'd like to get rid of the read-only permission entirely... but that is another problem). Maybe Fotema would do non-destructive edits or maybe after editing the user has to export photos to a new file (with Flatpak giving temporary write access to the new file via a portal)? However, I'm not sure that having to export the edited photo to save the changes would be a good user experience.

  • File-ownership: Regarding non-destructive edits, Fotema doesn't take ownership of a user's pictures or videos, leaving the user free to move or rename photos as they see fit. Fotema can't tell that a moved/renamed file is a move/rename. Instead, it looks like one file is deleted and a new file has been added which causes Fotema to clean-up its database and any temporary files (like thumbnails) for the deleted file, and generate new database entries and thumbnails for the "new" file (even though it is really just an existing file moving). If edits are non-destructive and saved to Fotema's private work space (under ~/.var/app/app.fotema.Fotema/data), then how are deletions/moves handled? They couldn't be part of the normal clean-up process because I wouldn't want a user to move a photo in their file system, and then start up Fotema and watch in despair as their photo edits get automatically deleted. I could imagine having a "Edited" album in the navigation bar where a user can see all the photos they have edited, regardless of whether the original photo had been moved or not, but then you have a problem of an edited photo being disassociated from the original and choosing how to Fotema should deal with that.

  • Trapping data: if edits are non-destructive and saved to Fotema's private work space, then I would not want those photos to remain "trapped" in Fotema. Instead, I'd want it to be easy for users to get that data out so they can easily have fully control of their data. Maybe that would be a "Export all edited files" option.

@blissd
Copy link
Owner

blissd commented Sep 10, 2024

In hindsight... perhaps that big mind dump wasn't the best reply to your offer to look at photo editing tools!

Two developments might be of interest:

  1. Fotema now allows the user to choose which directory their pictures are stored in and uses the file chooser portal to do this. A side-effect of this is that Fotema now (I think) has write access to the chosen pictures directory. You can see a write permission if you run flatpak documents --columns=all app.fotema.Fotema.
  2. Loupe (the GNOME image viewer) looks like it is getting support for some image editing functions. Fotema already uses the same image loading library (Glycin) as Loupe, and I think it would be sensible for any future editing features in Fotema to be inspired by or cloned from how Loupe does it.

@CodingTurtle2
Copy link
Contributor Author

Ok, my previous implementations would be slightly different (because I mainly tried not to use write acces and with write access it could definitely be programmed more efficiently and better, which is why I would have to change some things) and it would be very difficult to integrate them in combination with loupe (when Loupe is getting support for it), which is why I'm stopping my work on it for now.
Accordingly, I'm closing this suggestion

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

No branches or pull requests

2 participants