Improved image resizing

Development-related discussion, including bundled plugins
User avatar
HeikoAdams
Bear Rating Master
Bear Rating Master
Posts: 101
Joined: 19 Mar 2013, 00:17

Improved image resizing

Postby HeikoAdams » 22 Mar 2013, 22:44

Hi,
I've written a patch which improves the image resizing since the curren style (max-width: 98%) isn't perfect at all
Attachments
resize_images.patch
(257 Bytes) Downloaded 191 times

ender
Bear Rating Trainee
Bear Rating Trainee
Posts: 1
Joined: 23 Mar 2013, 03:25

Re: Improved image resizing

Postby ender » 23 Mar 2013, 04:10

Where you say, in your patch:
+ heigt: auto;

it should say at the very least:

+ height: auto;

User avatar
HeikoAdams
Bear Rating Master
Bear Rating Master
Posts: 101
Joined: 19 Mar 2013, 00:17

Re: Improved image resizing

Postby HeikoAdams » 23 Mar 2013, 19:39

Thanks for the info. I've fixed my patch
Attachments
resize_images.patch
v1.1
(258 Bytes) Downloaded 148 times

User avatar
HeikoAdams
Bear Rating Master
Bear Rating Master
Posts: 101
Joined: 19 Mar 2013, 00:17

Re: Improved image resizing

Postby HeikoAdams » 01 Apr 2013, 22:50

Okay, here's the latest version of my improved image resize patch. I'd enjoy to see it landing into trunk
Attachments
image_resize.patch
(295 Bytes) Downloaded 172 times

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Improved image resizing

Postby fox » 01 Apr 2013, 22:51

Can you elaborate on the subject of 500 pixels being the optimal value here?

User avatar
HeikoAdams
Bear Rating Master
Bear Rating Master
Posts: 101
Joined: 19 Mar 2013, 00:17

Re: Improved image resizing

Postby HeikoAdams » 01 Apr 2013, 23:03

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.

phz
Bear Rating Disaster
Bear Rating Disaster
Posts: 77
Joined: 18 Mar 2013, 18:32

Re: Improved image resizing

Postby phz » 01 Apr 2013, 23:42

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.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Improved image resizing

Postby fox » 01 Apr 2013, 23:59

No you see 500px is much better because it's a good value.

User avatar
HeikoAdams
Bear Rating Master
Bear Rating Master
Posts: 101
Joined: 19 Mar 2013, 00:17

Re: Improved image resizing

Postby HeikoAdams » 02 Apr 2013, 00:28

Maybe there should be an option "Scale down images" so everyone can decide if he wants images scaled down or in original size.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Improved image resizing

Postby fox » 02 Apr 2013, 09:10

Another option. Awesome.

Empirical
Bear Rating Trainee
Bear Rating Trainee
Posts: 10
Joined: 11 May 2013, 01:22

Re: Improved image resizing

Postby Empirical » 11 May 2013, 01:28

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?

vidar
Bear Rating Trainee
Bear Rating Trainee
Posts: 13
Joined: 06 May 2013, 00:19

Re: Improved image resizing

Postby vidar » 12 May 2013, 23:41

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;
}

Empirical
Bear Rating Trainee
Bear Rating Trainee
Posts: 10
Joined: 11 May 2013, 01:22

Re: Improved image resizing

Postby Empirical » 12 May 2013, 23:53

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.

levito
Bear Rating Disaster
Bear Rating Disaster
Posts: 77
Joined: 17 Mar 2013, 04:18

Re: Improved image resizing

Postby levito » 13 May 2013, 01:02

@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.


Return to “Development”

Who is online

Users browsing this forum: No registered users and 4 guests