Page 1 of 1

Improved image resizing

Posted: 22 Mar 2013, 22:44
by HeikoAdams
Hi,
I've written a patch which improves the image resizing since the curren style (max-width: 98%) isn't perfect at all

Re: Improved image resizing

Posted: 23 Mar 2013, 04:10
by ender
Where you say, in your patch:
+ heigt: auto;

it should say at the very least:

+ height: auto;

Re: Improved image resizing

Posted: 23 Mar 2013, 19:39
by HeikoAdams
Thanks for the info. I've fixed my patch

Re: Improved image resizing

Posted: 01 Apr 2013, 22:50
by HeikoAdams
Okay, here's the latest version of my improved image resize patch. I'd enjoy to see it landing into trunk

Re: Improved image resizing

Posted: 01 Apr 2013, 22:51
by fox
Can you elaborate on the subject of 500 pixels being the optimal value here?

Re: Improved image resizing

Posted: 01 Apr 2013, 23:03
by HeikoAdams
IMHO a maximum size of 500 pixel is good value because the images are well sized and don't destroy the readability as the did with

Code: Select all

max-width: 98%

before.

Re: Improved image resizing

Posted: 01 Apr 2013, 23:42
by phz
Personally I clear the max-width-setting for images, since I most often want them to be in their original size. For me images in RSS feeds are often from web comics or diagrams meant for reading in native size, and to have them scaled down would pretty much make them unreadable.

I think many regular users would be surprised and not quite happy by having their comics restricted in x/y to 500 px, if this is what this patch does. By all means, use it yourself as a user CSS if it fits you (we are all different :-) ), but I don't think it should go into trunk without a lot more feedback from users on the issue.

Hard-coded 500 px is also probably problematic in trunk, since it does not take into account different screen sizes. Some will find the restriction useless, and some will find it cramping.

Re: Improved image resizing

Posted: 01 Apr 2013, 23:59
by fox
No you see 500px is much better because it's a good value.

Re: Improved image resizing

Posted: 02 Apr 2013, 00:28
by HeikoAdams
Maybe there should be an option "Scale down images" so everyone can decide if he wants images scaled down or in original size.

Re: Improved image resizing

Posted: 02 Apr 2013, 09:10
by fox
Another option. Awesome.

Re: Improved image resizing

Posted: 11 May 2013, 01:28
by Empirical
I've had a problem with images looking like this:

Image

I have a feeling this is because there might be a manual

Code: Select all

height
attribute applied to the image in that feed, but is there any way for TT-RSS to override this when displaying it in the viewer?

Re: Improved image resizing

Posted: 12 May 2013, 23:41
by vidar
I had the problem with images being stretched vertically when reduced in size by css. Fixed it for my tt-rss user by adding the following in the Customize stylesheet option in Preferences:

Code: Select all

div.postContent img {
        height: auto;
}

Re: Improved image resizing

Posted: 12 May 2013, 23:53
by Empirical
vidar wrote:I had the problem with images being stretched vertically when reduced in size by css. Fixed it for my tt-rss user by adding the following in the Customize stylesheet option in Preferences:

Code: Select all

div.postContent img {
        height: auto;
}


Thanks, I've put that in for my user and hopefully it works out.

Re: Improved image resizing

Posted: 13 May 2013, 01:02
by levito
@Empirical, if you are on v1.7.8 or earlier, you should add the height: auto to more elements. The issue has been fixed on github and will be included in 1.7.9 (see https://github.com/gothfox/Tiny-Tiny-RSS/pull/150 and the subsequent commits)

Put the following into your custom stylesheet:

Code: Select all

div.postContent img,
div.cdmContentInner img {
    height: auto;
}


If you are already on 1.7.9 from github: Which browser/version are you using? Maybe you could also tell us the feed with the problematic images.