Repository navigation
feat(mobile): adds crop and rotate to mobile - #10989
Conversation
martyfuhry
left a comment
There was a problem hiding this comment.
This is so cool, thank you for your pull request! I was not aware of the crop_image package. I'm not super familiar with this package, so I'm not completely sure about how it works.
I'd prefer using the flutter_hooks package just to remain consistent (although I've had my fair share of issues with it, in the past...)
I did not run this or test this.
|
Thank you @martyfuhry for the code suggestions, I will immediately make the necessary changes. Before I approve the code I would like to test them on my device, just to make sure everything works. Thanks for those suggestions again! |
martyfuhry
left a comment
There was a problem hiding this comment.
I'm not tremendously sure how to add an image to the server...
I think you need to actually add the image to your own gallery on your phone, first. Then, you can manually invoke the upload procedure on the new asset.
We use photo_manager for accessing the gallery. Try the PhotoManager.editor.saveImage function? Maybe some others have a better idea.
martyfuhry
left a comment
There was a problem hiding this comment.
Please add comments (even just one short sentence) above all of your classes to explain what they are for. Use the dart comments conventions.
It all looks good to me, otherwise! Please try saving the image to the gallery using the photo_manger package:
You can create an entity from raw data, such as downloaded images, recorded videos, etc. The created entity will show as a corresponding resource on your device's gallery app.
final Uint8List rawData = yourRawData;
// Save an image to an entity from `Uint8List`.
final AssetEntity? entity = await PhotoManager.editor.saveImage(
rawData,
title: 'write_your_own_title.jpg', // Affects EXIF reading.
);We could also use the returned entity to start a backup job immediately. Or we could do that in a future PR.
|
@martyfuhry does this now acceptable for merging? Keen to see such feature! |
This comment was marked as spam.
This comment was marked as spam.
|
Sorry lol, not sure because it's not in my hands now for merging. @martyfuhry is going to merge it soon 😁 |
martyfuhry
left a comment
There was a problem hiding this comment.
I am sorry for my late reply! I had forgotten about the routing, it is a small change. I will test this out on my phone soon, too!
Thank you so much for your continued patience and hard work. We really appreciate your contribution, and I know this is a very valuable feature. I am looking forward to trying this out.
|
Done! Just got everything cleaned up and fixed. Everything should work well and the timeline gets immediately updated when saving an edited image. I hope this is the final commit, that set don't hesitate to let me know any issues with my code. Once I get this basic edit layout stuff done, I could start working on the other features like filters and doodling! |
alextran1502
left a comment
There was a problem hiding this comment.
It is getting there!!!! One last request. When there is no edit made, can we hide the "Save to gallery" button"
|
Done! the button should be hidden until you make a change or use crop. |
|
congratulations! 😊 |
|
@Yuvi-raj-P many thanks for your work on this! |
|
So great to have some basic image editing functionality included in Immich now. Wanted to ask - is there any chance some basic markup tools (like the ability to just scribble on and notate part of an image) might further extend this feature in the future? |
|
🎉 Is this ever going to make it's way to the web app? |
Yes, efforts are ongoing under #24155. |






Added an image editor and it has a crop feature only (for now)
