Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 11:56 02 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Other Stuff : Update to the forum software.

Author Message
Gizmo

Admin Group

Joined: 05/06/2004
Location: Australia
Posts: 5019
Posted: 10:44am 18 Apr 2008
Copy link to clipboard 
Print this post

Hi Guys

I've modified the image upload code to automatically resize pictures. So in future if someone uploads a picture that is too big, the forum will resize the picture down and resave it. I've set the max width to 500 pixels, which is more than enough for most pictures.
It works like this - Once the picture is uploaded and saved, a bit of code checks the picture for its width. If its over 500 pixels, it resizes the picture down and resaves the file. The aspect ratio is saved, so the picture wont look squashed so mater which way round it was. Works for both JPG's and GIF's.
A little bonus is images saved at 500 pixels wide are on average only about 50k in size, so the forum pages with lots of photos' should load faster.

There is still the default upload limit of 500k on any pictures you upload, so you will still need to resize any really big pictures yourself.

If anyone notices anything weird happen when they upload pictures, let me know.

Glenn


The best time to plant a tree was twenty years ago, the second best time is right now.
JAQ
 
Gill

Senior Member

Joined: 11/11/2006
Location: Australia
Posts: 669
Posted: 12:38pm 18 Apr 2008
Copy link to clipboard 
Print this post

Glenn,
I've just given it a try by using EDIT and addeding an oversize (600) to a current post. No glitches so far. Then saved the pic off the forum and compared it to the origional. Surprisingly it had worked. Forum pic is smaller and 500 wide.

Gee I wish I was half as clever and could do that sort of stuff.

Great job.
was working fine... til the smoke got out.
Cheers Gill _Cairns, FNQ
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024