accumulator / Quickddit

Reddit client for Jolla's SailfishOS, Ubuntu Touch and Nokia N9
GNU General Public License v3.0
53 stars 21 forks source link

Fix for "tall" screenshots of twitter/fb convos being hazy #62

Closed szopin closed 4 years ago

szopin commented 4 years ago

Like this example https://i.redd.it/rofslowas4941.jpg probably won't fix it for all extreme cases but in the given example makes the thread readable

accumulator commented 4 years ago

This is too much for Jolla 1, which is not able to handle 4096px tall textures. I don't know exactly what the max height is for Jolla 1 phone, and I don't know how to query that from the sailfish API (if at all possible), but I think it might be increased a bit (e.g. 3072). Unfortunately my Jolla1 is lent out to someone else, so I cannot test a.t.m.

Proper solution (well, still workaround) is to be able to query the max texture size from the driver/GL stack..

szopin commented 4 years ago

Maybe we can pull the screen width/height and if bigger than 540x960 use the bigger value? I believe only Jolla 1 has those dimensions and anything from JollaC upwards can handle it? Wonder if that issue shows up in the emulator, would be worth checking

szopin commented 4 years ago

Ok even 4096 doesn't help in case of an image like this(sorry for politics but it's the one I stumbled upon): https://m.imgur.com/Q4LoTRd It works in browser (some imgur magic or browser using different rendering method?), but is a pixelated mess otherwise, even if you save it from imgur and then opened in gallery, so is qt unable to render it(quickddit/gallery), but also able to render it when viewed in browser, really weird. Worth reporting at tjc?

accumulator commented 4 years ago

Sorry for the late reply, not really paying attention to github lately :)

It's a QML Image component limitation. My guess is the browser is smarter going from image source -> texture from subimage -> screen, QML Image is more like image source = texture -> screen