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

Resized images #1044

Closed
wants to merge 1,209 commits into from
Closed

Resized images #1044

wants to merge 1,209 commits into from

Conversation

tobiasKaminsky
Copy link
Contributor

Every image is loaded in a reduced version. The width and height is determinated by the screen.
If the user wants to have the real file, he has to long-click and select download.

The benefit is a very small, but yet usable preview of the image.
It can be used to send via whatsapp, or as a file to another app (like k9) with the correct filename.

Remaining problem:
owncloud/core#16250

@tobiasKaminsky
Copy link
Contributor Author

When the reduced image is shown we could add a FAB to download the original file.
@AndyScherzinger Do you want to do this? And maybe do the code review / functionality check?

@tobiasKaminsky
Copy link
Contributor Author

@davivel Can we schedule this for the next milestone or the one after that?
I think this is a very big improvement to save data traffic, especially when using mobile.

@joeplus
Copy link

joeplus commented Sep 21, 2015

This would be huge and speed up the thumbnail loading significantly I can assume, in addition to the saved traffic!

@tobiasKaminsky tobiasKaminsky mentioned this pull request Oct 6, 2015
@tobiasKaminsky
Copy link
Contributor Author

For now this PR depends on galleryplus for OC < 8.2 and gallery for OC >= 8.2.
By OC 9.0 we can change to the new preview webdav api.

@AndyScherzinger
Copy link
Contributor

@tobiasKaminsky As soon as #1100 is merged to master I can add a FAB here, in case this is fine with @jancborchardt :)

Besides that I will have to wait for OC 8.2 (Web Updater)

@elpraga
Copy link

elpraga commented Nov 9, 2015

@tobiasKaminsky I am not 100% sure if we are talking about the same thing, but I guess You know better as You are more involved in this thread.

My original idea mentioned in #1278 was to show enlarged thumbnail and a spinning wheel instead of just a spinning wheel and a black background as for now while the larger preview is being downloaded / generated by the server (when we just look through pictures in fullscreen)

  • in a similar way how google does it while we preview image search on Android.
    This would give a user at least an idea what preview is he/she waiting for right now.

@tobiasKaminsky
Copy link
Contributor Author

@elpraga see #1278
There we can discuss it better :)

@tobiasKaminsky
Copy link
Contributor Author

@rperez can we have this in the milestone after the current one?
As far as I have read in beta this is one of the most valuable improvements for the majority of the user.

@rperezb
Copy link

rperezb commented Mar 21, 2016

@tobiasKaminsky some doubts

  • curious by this comment: Resized images #1044 (comment)
    Is it needed to have enabled the galleryplus app or oc9 ?
  • on the other hand, what happens when you download a folder? by default, if there are images, they are downloaded reduzed? if I wanted to download a folder with the highest resolution, could I?

@rperezb
Copy link

rperezb commented Mar 21, 2016

@jancborchardt what do you think about including this on the product? By default not downloading the full resolution image?
cc @MTRichards

@jancborchardt
Copy link
Member

@tobiasKaminsky I’ve been using this in practice for quite some time in the Beta app. And I have to say it’s a bit unexpected. It’s great that the bigger thumbnail immediately shows so I can just view it. But as soon as the file is opened, it should download in the background. That’s somehow just expected.

Right now every time I zoom into a picture, I have to wait additionally for it to be downloaded. But opening a picture is a desire to view it, hence ownCloud should directly download it.

@tobiasKaminsky
Copy link
Contributor Author

Currently I am using the owncloud as a giant photo album and it happens quite often that I show 50-100 pictures while I am not in WLAN. With this PR the transferred data is not 7MB per image but ~100Kb and therefore saves really really much traffic, which is expensive in germany ;)
That was the main reason for creating this PR.
Of course, @jancborchardt, it happens that I do need to zoom in, but this is in 1:50 cases...

I remember that we talked about this quite some time ago and you proposed that the image could be auto-downloaded while zooming in at a certain level.
Maybe it is also an idea to have this as an option.
But I do think that it is quite a big improvement for the user to have an image nearly immediately which also does not take much space.

@tobiasKaminsky
Copy link
Contributor Author

@rperezb

on the other hand, what happens when you download a folder? by default, if there are images, they are downloaded reduzed? if I wanted to download a folder with the highest resolution, could I?

Downloading is working just the way it is now.
The difference is that a normal click on an image does not download the whole file but just load the resized/screen adapted version of it and stores this resized image in cache.

Is it needed to have enabled the galleryplus app or

OC < 8.2: galleryplus
OC >= 8.2: gallery
OC > 9: webdav api (not working now)
The main reason behind this is that a thumbnail API with custom size is needed.

@jancborchardt
Copy link
Member

@tobiasKaminsky right, then let’s see what we can do to enhance this behavior. Download on zooming in is definitely good, but I feel this might not be enough. I would say the download should happen at already the tiniest amount of zoom, not only at a certain level. Is that ok? And maybe let’s also do it when a picture was viewed longer than x seconds, say 3?

@elpraga
Copy link

elpraga commented Mar 22, 2016

I am not so sure @jancborchardt if automatic downloading intermediately after starting a zoom is a good idea and I certainly disagree that starting a download after viewing the image for 3 secs automatically is a way to go.

I have been using both beta and and a legacy app for a long time, and I love the behavior of beta concerning the images, as it allows me to comfortably view images and to save valuable space on my mobile device.

Mobile data consumption and using limited space are the two main concerns I have on my mobile device, and I don't think it would be good to download some files automatically. The original photos are usually much larger then the previews and they would be hidden in a directory tree and it would make cleaning up those unintentionally downloaded original photos to free space unnecessarily time consuming and hideous.

Most of the times viewing the previews of photos in full screen is sufficient (even on a tablet), and that is why I do not think that starting the download automatically after viewing the image for 3 ses would be a good idea, and many times I did a small zoom, but not always I wanted to download the original photo. But I do understand that it should be clear for the viewer that he is seeing a preview and not a poor quality original.

What about showing a clickable text: "Do you want to download the original full size photo?" (obviously not as long, I wrote is so long to explain clearly the idea) when zooming starts? Is it technically doable?

What do you think about this?

@tobiasKaminsky
Copy link
Contributor Author

There is something like that: https://github.com/JohnPersano/SuperToasts
toast

This could say "download full image: yes / no", and will be shown after zooming in with e.g. 2x .
After the second it will show "never", just like the translate box in firefox. Same for "yes" -> "ever".
Then a toast can be shown: Behaviour can be changed in settings.
In setting: click on image downloads:

  • full image to mobile
  • resized image to cache

I strongly disagree on downloading anything automatically.

@jancborchardt I know that you do not like new settings, but is this something worth to put in?

@AndyScherzinger
Copy link
Contributor

As an alternative to a "SuperToast" you could now also just make use of the Snackbar, like we now use it for hinting the user for granting the permission, see screenshot: #1343 (comment)

@tobiasKaminsky
Copy link
Contributor Author

Snackbar seems much better as it is not another lib!
👍 for the hint.
Waiting for @jancborchardt @davivel @rperezb for the final go

@rperezb
Copy link

rperezb commented Mar 23, 2016

@jancborchardt is the one here
thx

@davivel
Copy link
Contributor

davivel commented Jul 5, 2016

This is not active any more, #1599 is the place to go -> closing.

@davivel davivel closed this Jul 5, 2016
@hannesa2 hannesa2 deleted the resizedImages branch July 12, 2021 18:58
@jesmrec jesmrec removed the Image label Mar 27, 2023
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

Successfully merging this pull request may close these issues.