IacobIonut01 / Gallery

Light-weight Media Gallery app for Android made with Jetpack Compose
Apache License 2.0
1.18k stars 60 forks source link

[Improvement] Cropping #441

Open Feuerswut opened 2 weeks ago

Feuerswut commented 2 weeks ago

What happens

  1. Click on Image and select Crop
  2. Crop (by zooming or dragging)
  3. Save changes (Save as)
  4. Will not be cropped, but just be copied.

Expected behavior

  1. Click on Image and select Crop
  2. Crop (by zooming or dragging)

not having to click the tiny text-only apply button, but apply automatically gets executed on pressing Save Copy

  1. Saved changes

Details The best implementation I can see is Google Photos: If you switch from the "Crop" Tab to another Tab, e.g. "Filters", the Crop gets visually pre-applied and you can select filters, you can go back and change the cropping, without losing the settings you did in other tabs.

Implementation should be easy, simply apply each change from every Tab except the Tab you are currently in, where the current UI object should be addressed; this means:

  1. I go and crop my image
  2. Swich Tab (equivalent action: Apply change from Crop)
  3. I select a filter
  4. Switch back to Crop Tab, Filter gets applied, but Crop gets Un-Applied, while keeping the previously selected crop area visually.
  5. Switch to tilt. The Cropped area gets marked with the bounding box, but the bounding box itself can get tilted. If the bounding box touches the edge of the original sized image, it moves to crop (so that you don't fill parts of the image with black area)

Implementation is not easy, but if you have objects for the UI action and Objects for the Image Processing, it should be doable.

Why don't I like how it is currently? You forget to hit apply. Way too often. Also: If you Tilt an image after cropping it, you lose more parts of the image than necessary.

What other changes should be made: Fossify Gallery allows the edit action to switch to an external editor (or if you want to use the internal editor, there is an option in the action intent dialog supplied by android.) Maybe I still want to use Snapseed or something else, shortcuts are nice. This should also be added. Who knows, maybe an image can be displayed but not edited (tif, svg etc.); for each of those filetypes this dialog is helpful. And this is rather easy to implement.

Smartphone (please complete the following information): Irrelevant

Additional context Look at the UI design of Samsung Gallery or Google Photos or Fossify Gallery (F-Droid)

ken-der-guru commented 2 weeks ago

Could it be that you just forgot to click the "apply" button before saving the picture. This is necessary for the crop to be actually saved.

As this behavior is unexpected and a copy is saved anyway, I don't see a reason why the changes don't get applied automatically once you save the picture.

Feuerswut commented 2 weeks ago

Could it be that you just forgot to click the "apply" button before saving the picture. This is necessary for the crop to be actually saved.

As this behavior is unexpected and a copy is saved anyway, I don't see a reason why the changes don't get applied automatically once you save the picture.

You are right, it is just bad UI design. suboptimal design.

Someone please change the tags.

lidgnulinux commented 5 days ago

Hello, how do you have cropping feature ? I'm using 3.0.0 version and when I press edit icon, I get "no apps can perform this action". It works before upgrade.

IacobIonut01 commented 5 days ago

Hello, how do you have cropping feature ? I'm using 3.0.0 version and when I press edit icon, I get "no apps can perform this action". It works before upgrade.

The built-in image editor has been disabled currently as I'm re-making it