-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
fix(mobile): Multipart image loading for iOS double swipe #7064
fix(mobile): Multipart image loading for iOS double swipe #7064
Conversation
// TODO: Use local preview | ||
// Load a small thumbnail | ||
final thumbBytes = await asset.local?.thumbnailDataWithSize( | ||
const ThumbnailSize.square(2000), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we reuse the identical settings (default) add for thumbs on the grid, this will share the cached image because it's identical and super fast (already loaded for the grid view...)
Otherwise if this is too small: at least make the dimensions multiples of 16 (image codecs usually work in batches of 8x8 or 16x16) and set the quality to 80 (100 wastes a lot of space for almost identical visual quality as photo manager stores these thumbnails on the device)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does 256 with 80 quality sound?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect to me. However... The default is 250? for dumb reasons. So, we should optimally stick to whatever is currently specified in ImmichImage class
quality: 100, | ||
); | ||
if (thumbBytes == null) { | ||
throw StateError("Loading thumb for ${asset.fileName} failed"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to error. We can simply try the original still..?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point.
… out on thumbnail
Deploying with Cloudflare Pages
|
ea293df
into
refactor/immich-image-provider
* Adds image provider * uses image provider * wip load preview * wip everything but activity asset thumbnail needs some help with a remote id * Immich provider used in gallery * First draft of the immich image provider, working nicely! * Removed OriginalImageProvider * Fixes for thumbnails * feat(mobile): thumbhash support (#7028) * feat(mobile): thumbhash support * perf(mobile): store bmp thumbhash bytes in Isar --------- Co-authored-by: shenlong-tanwen <[email protected]> * Uses octoimage for fade in and placeholders * fixes thumbnails, removes unused values, adds better thumbnail size * removes thumbhash support for now * Forgot one thumbhash removal * Use big thumbnail for local image on ios * fix(mobile): Multipart image loading for iOS double swipe (#7064) * uses local thumb first * Multipart thumbnail * Clean up file delete * await file delete * Fynn's comments, made thumbnail smaller and doesn't crash on erroring out on thumbnail * lint --------- Co-authored-by: Marty Fuhry <[email protected]> Co-authored-by: Alex <[email protected]> * Moves http client to global private place for reuse * Got rid of usePreview for local image providers since we always show a thumbnail anyway first * linter --------- Co-authored-by: shenlong <[email protected]> Co-authored-by: shenlong-tanwen <[email protected]> Co-authored-by: Alex <[email protected]> Co-authored-by: Marty Fuhry <[email protected]>
No description provided.