Image resize


Darkmunk

Link Posted 17/07/2008 - 08:15
I have looked at the code for this site and the images are NOT being resized by the forum (by the server), they are being resized by your browser!
This is number one mistake that novice 'web designers' make.
Your computer is using all its bandwidth downloading all your 800 pixel images and then your browser is resizing them to 550, this creates jagged edges on high-contrast images and serves no purpose except to make room for those revolting adds which now take up a third of your forum.

This also reveals the patronising repy I received about the logo compression to be at best 'spin' and at worse a downright lie.

Just to put this into context I have no problem with change and I could live with this new forum but the intrusive ads stink, the complete indifference regarding the quality of our images, our viewing pleasure and the patronising replies, make me hate everything that this change represents at the moment.
Facebook Page
Plymouth Photographer

ChrisA

Link Posted 17/07/2008 - 09:43
I was fooled too, by the extraordinary time it was taking to open threads with lots of images - I assumed it was the server doing it all and didn't look at the page source.

Well I have now, and it certainly looks to me as if Darkmunk is right.

For those that don't read HTML, the way they've done it is to take the actual link to our images in Flickr, or PhotoBox, or wherever, and just make these into a link, which opens the same image in a separate browser (or browser tab, if you use a tabbed browser).

Except that additional code is added that tells the browser how to resize the image - to a max length or height of 550px.

So our original image host is what serves the image, and the forum code tells the browser how to resize it.

However, this doesn't explain why it's taking such an inordinate amount of time to open them. Browsers take no time at all to resize images.

Looking closely at the resizing, it seems to me that the widths and heights are specified inline with the links to the images, and have been calculated to retain the aspect ratio of the original.

So one of mine, for example, which is 850px wide and 498px high, gets resized with HTML properties that say:

width="550" height="322.23529411765"

Note all the decimal places in the calculated height.

Now something has had to write those height and width values into the HTML - so the forum server must have read the images from the host to check their actual size, then recalculated the width and height, and then generated HTML links with the image URL as the original, but width and height as calculated.

If I'm right, then this gives us the worst of all worlds - a delay while the forum server reads the images in order to recalculate the dimensions, and then another delay while our browser downloads them again and resizes them. And browser-resizing is well known to produce very poor results.

This would also have the effect of doubling the traffic-per-image from image hosting web sites - and for users with bandwidth limitations, this could affect their costs.
.
Pentax K-3, DA18-135, DA35 F2.4, DA17-70, DA55-300, FA28-200, A50 F1.7, A100 F4 Macro, A400 F5.6, Sigma 10-20 EXDC, 50-500 F4.5-6.3 APO DG OS Samsung flash SEF-54PZF(x2)
.

Clarky

Link Posted 17/07/2008 - 10:08
Its all a foreign language to me, but i get the gist of what you are saying, and i have to agree with everyone on this issue. Its just not good enough especially on a photographic forum. Images are what its all about, posting and viewing them, and if we can't get these 2 basic fundamentals right, then what is the point.
Camera:|K-7|
Pentax Lenses:|DA12-24/f4 ED AL|DA35Ltd Macro|FA31Ltd|FA77Ltd|FA50/1.4|F70-210|FA20-35 f4/AL|A*200/f4 Macro ED|A50/1.7|A50 Macro f2.8|1.7xAF adapter|
Voigtlander|125/f2.5SL Macro APO Lanthar|
Sigma Lenses:|EX DG 100-300 f4|2X & 1.4X TC|
Flashes:|AF540FGZx2|RingFlash AF160FC|

ikillrocknroll

Link Posted 17/07/2008 - 10:52
I just don't understand,
why 550?
Surely it would be alot more sensible to work around 600?
its more common for people to use anyway, so no resizing,
and for example, a 800x600 image would be resized to 600x400 (nice) rather than 550x412.5 (not nice)
It wouldnt be that hard to change now..

And if they are trying to design this forum around 800x600, then dont bother because anyone with 800x600 resolution will a) be used to having to scroll, or b) still running 56k etc. so wouldnt be able to see the heavy graphical site.
http://www.behance.net/robbranigan
K20D, DA18-55II, FA50 1.4, DA10-17
To buy: Metz 58 AF-1, DA*50-135, DA12-24, DA100M

George Lazarette

Link Posted 17/07/2008 - 11:01
ikillrocknroll wrote:
...for example, a 800x600 image would be resized to 600x400 (nice) rather than 550x412.5 It wouldnt be that hard to change now..

800x600 is a ratio of 4:3. 600x400 is a ratio of 3:2.

800x600 reduces to 600x450.

G
Keywords: Charming, polite, and generally agreeable.

ikillrocknroll

Link Posted 17/07/2008 - 11:06
Sorry, its early morning
Wouldnt you agree that 450 is better than 412.5 though?
http://www.behance.net/robbranigan
K20D, DA18-55II, FA50 1.4, DA10-17
To buy: Metz 58 AF-1, DA*50-135, DA12-24, DA100M

ChrisA

Link Posted 17/07/2008 - 11:07
By the way, FWIW, I've raised a problem report linking to this thread, so that we can hopefully get a view from the powers that be on the technical issue that Darkmunk and I have raised.
.
Pentax K-3, DA18-135, DA35 F2.4, DA17-70, DA55-300, FA28-200, A50 F1.7, A100 F4 Macro, A400 F5.6, Sigma 10-20 EXDC, 50-500 F4.5-6.3 APO DG OS Samsung flash SEF-54PZF(x2)
.

jps

Link Posted 17/07/2008 - 11:12
I'm with Clarky in that I'm not au fait with the technicalities of this, but if Darkmunk is correct then it sounds like a serious issue that needs addressing.

Jonathan

Nimitz

Link Posted 17/07/2008 - 11:47
I got no clue when reading html and similar - I tried to open the comepetition thread. Holy cow that was slow....... and I'm at work and the connection here should be extremely fast....makes me wonder how slow it will be at home. zzzzzzzzzzzzzzzzzz
www.mieritz.net

davidburleson

Link Posted 17/07/2008 - 12:32
Hi Everyone,

Yes, we did simply resize the images in html. The old size displayed the images full size any way and having the server actually resize the file would have taken even longer to do.

However, this is not a problem any more as we have removed the resizing of images.

David
Having problems? We're here to help! Contact PU Support.

George Lazarette

Link Posted 17/07/2008 - 12:34
The competition threads now load very quickly.

You're getting there.

G
Keywords: Charming, polite, and generally agreeable.

ChrisA

Link Posted 17/07/2008 - 12:37
George Lazarette wrote:
The competition threads now load very quickly.

You're getting there.

You beat me to it, George!

I can confirm this - delighted by this change.

I also really like the way the content now resizes with the browser, as I suggested yesterday.

As I said, I can live with this now, while all the myriad other things are addressed bit by bit.

Thanks for the responsiveness, guys.
.
Pentax K-3, DA18-135, DA35 F2.4, DA17-70, DA55-300, FA28-200, A50 F1.7, A100 F4 Macro, A400 F5.6, Sigma 10-20 EXDC, 50-500 F4.5-6.3 APO DG OS Samsung flash SEF-54PZF(x2)
.

davidburleson

Link Posted 17/07/2008 - 12:39
we try
Having problems? We're here to help! Contact PU Support.

ChrisA

Link Posted 17/07/2008 - 12:41
davidburleson wrote:
we try

And we're all really nice people, too.

It's just that being treated like idiots tends to get us ornery.

Still, today is a new day, and it seems to be a much better one than yesterday - so many thanks
.
Pentax K-3, DA18-135, DA35 F2.4, DA17-70, DA55-300, FA28-200, A50 F1.7, A100 F4 Macro, A400 F5.6, Sigma 10-20 EXDC, 50-500 F4.5-6.3 APO DG OS Samsung flash SEF-54PZF(x2)
.

George Lazarette

Link Posted 17/07/2008 - 12:49
ChrisA wrote:
davidburleson wrote:
we try

And we're all really nice people, too.

All? Who was berating me for generalisations recently?

But most of us, most of the time.

The single most important criticism has been addressed, and more quickly and more satisfactorily than anticipated.

There are obviously numerous bugs still to deal with, and the usability of the first page needs to be looked into. Do we need those horrid black bars?

But generally, very good progress is being made. Credit where it's due.

G
Keywords: Charming, polite, and generally agreeable.
Add a Comment
You must be registered or logged-in to comment.