gallery icon indicating copy to clipboard operation
gallery copied to clipboard

Panorama pics don't look very good

Open oparoz opened this issue 9 years ago • 12 comments

From @jospoortvliet on March 5, 2015 13:54

Hi,

Panorama images don't look good in GalleryPlus, neither as thumbnail nor when clicked. They seem to be rendered in very low quality. Not sure if this is on my side, but I do see it for all wide pics. They are shown really cool: width shows up nicely in the thumbnail view, the image view can zoom and scroll very well. Just rendered at a low resolution...

eight1

Otherwise, awesome work on GalleryPlus - just updated to oC 8.0.1 and a git checkout of the performance fixes branch. Haven't applied the performance patches to ownCloud, just using it this way - not a big problem as long as I don't go to the root. I have to navigate to a sub folder with images in the Files app and then switch to Gallery and all is well ;-)

Let's get this app merged back in core! That would really rock.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Copied from original issue: owncloud/gallery#61

oparoz avatar Sep 04 '16 09:09 oparoz

Thanks for the report... and the kind words :). I can confirm the bug, it's clearly visible on the demo as well. Preview in core can't handle wide pictures, it sends back messed up previews. I fix them for the square previews (albums containing wide pics should look normal), but didn't want to have to fix all of them as it doubles the processing time. Maybe I should... And even though it's been mentioned several times in various tickets, I don't think it's even in the core tracker.

(I've just pushed the latest changes from master to performance-fixes, so that you can benefit from them as well)

oparoz avatar Sep 04 '16 09:09 oparoz

OK, filed in core https://github.com/owncloud/core/issues/14712

oparoz avatar Sep 04 '16 09:09 oparoz

A big problem we'll be facing when this is fixed is that all these "bad" pictures will be stored in the cache as 400-200-with-aspect.png and there is currently no way to fix only select thumbnails without manually removing them.

oparoz avatar Sep 04 '16 09:09 oparoz

So, I've had a look and for large previews, I've applied a quick fix which should help with most previews

oparoz avatar Sep 04 '16 09:09 oparoz

For thumbnails, it's a bit more complicated. We always ask for 400x200 pictures, so it's either

  • we stretch them to maybe 800x400 and crop them to 800x200, leading to blurry thumbnails or
  • we crop them to 400x200, but there is no way of telling they're panoramic.

The 3rd option is to ask for the image size in advance, but that's going to slow down operations as each image has to be tested even before we start showing anything.

oparoz avatar Sep 04 '16 09:09 oparoz

From @jospoortvliet on March 6, 2015 13:17

Hmm, the crop is probably the best one. That is already wide, and it's less bad than blurry I think...

oparoz avatar Sep 04 '16 09:09 oparoz

Let's see if other people want to chime in. It should be possible to fix wide images, but the Preview class doesn't make it easy as there isn't a way to invalidate a preview, so we have to generate a new one.

oparoz avatar Sep 04 '16 09:09 oparoz

I've filed this in core to try and make it easier to alter previews quickly if we see that a preview could be problematic: https://github.com/owncloud/core/issues/14739

oparoz avatar Sep 04 '16 09:09 oparoz

From @jospoortvliet on March 6, 2015 23:52

@oparoz note that in my opinion - this isn't a huge issue. The crop is quite OK. Yes, yes, showing them fully is prettier, but it isn't worth a HUGE amount of work unless you feel like taking on the challenge :D

oparoz avatar Sep 04 '16 09:09 oparoz

The problem is that it doesn't only affect panoramic pictures. Any picture with a height smaller than 200 will be stretched, so cropping works for pictures, but wouldn't look great for logos per example.

oparoz avatar Sep 04 '16 09:09 oparoz

From @jospoortvliet on March 7, 2015 19:4

Ok, I understand. So no easy fix for this one...

oparoz avatar Sep 04 '16 09:09 oparoz

Having this would help greatly https://github.com/owncloud/core/issues/7881

oparoz avatar Sep 04 '16 09:09 oparoz