Approve the Cookies
This website uses cookies to improve your user experience. By using this site, you agree to our use of cookies and our Privacy Policy.
OK
Forums  •   • New posts  •   • RTAT  •   • 'Best of'  •   • Gallery  •   • Gear
Guest
Forums  •   • New posts  •   • RTAT  •   • 'Best of'  •   • Gallery  •   • Gear
Register to forums    Log in

 
FORUMS Post Processing, Marketing & Presenting Photos RAW, Post Processing & Printing 
Thread started 16 Jul 2007 (Monday) 13:49
Search threadPrev/next
sponsored links (only for non-logged)

Script to resize JPGs on webpage per frame size/or per screen resolution...

 
andrewaaa5
Goldmember
Avatar
1,225 posts
Joined Sep 2004
Location: scandinavia
     
Jul 16, 2007 13:49 |  #1

does anyone know of any script that can resize images (jpgs) depending on the size of browser frame, or the size of monitor resolution?

e.g. if someone has less resolution, say, on a laptop, that the images are resized accordingly... etc...


andrew crighton
website -- > www.butterpeanut.com (external link)
flickr -- > flickr/photos/andrewaa​a5 (external link)

  
  LOG IN TO REPLY
RickH
Mostly Lurking
17 posts
Joined Jun 2007
Location: Essex, UK
     
Jul 17, 2007 04:46 |  #2

andrewaaa5 wrote in post #3555300 (external link)
does anyone know of any script that can resize images (jpgs) depending on the size of browser frame, or the size of monitor resolution?

e.g. if someone has less resolution, say, on a laptop, that the images are resized accordingly... etc...

I'd recommend using the (built in) BananAlbum skin in JAlbum (http://jalbum.net/ (external link)). It is free, very flexible, and does what you need. I created this (external link) recently with it. I set the maximum size to 1024x768, but if you resize your browser window smaller, you'll see it does a pretty good job of scaling down.




  
  LOG IN TO REPLY
tim
Light Bringer
Avatar
51,010 posts
Likes: 375
Joined Nov 2004
Location: Wellington, New Zealand
     
Jul 17, 2007 07:16 |  #3

You can have the web browser do it for you, with code something like this.

<img src="whatever.jpg" width="50%" />


Professional wedding photographer, solution architect and general technical guy with multiple Amazon Web Services certifications.
Read all my FAQs (wedding, printing, lighting, books, etc)

  
  LOG IN TO REPLY
andrewaaa5
THREAD ­ STARTER
Goldmember
Avatar
1,225 posts
Joined Sep 2004
Location: scandinavia
     
Jul 17, 2007 12:01 |  #4

tim wrote in post #3559510 (external link)
You can have the web browser do it for you, with code something like this.

<img src="whatever.jpg" width="50%" />

but is this variable? e.g. if one has a high resolution widescreen, the images should be BIG, and for the same person when viewing on a small laptop the images should be shrunk depending on the browser size??

and thanks RickH, I shall look in to that also...


andrew crighton
website -- > www.butterpeanut.com (external link)
flickr -- > flickr/photos/andrewaa​a5 (external link)

  
  LOG IN TO REPLY
cosworth
I'm comfortable with my masculinity
Avatar
10,939 posts
Likes: 21
Joined Jul 2005
Location: Duncan, BC, Canada
     
Jul 17, 2007 12:08 |  #5

I have considered doing this for my site to cater to highbandwidth and WUXGA users. Make 3 sites, one for 1024, one for 1440 and another for 1920 - all with properly resized images.

Only caveat here is that some people disable java.

<SCRIPT language="JavaScript">
<!--
if ((screen.width>=1024) && (screen.height>=768 ))
{
window.location="highr​es.html";
}
else
{
window.location="lowre​s.html";
}
//-->
</SCRIPT>


people will always try to stop you doing the right thing if it is unconventional
Full frame and some primes.

  
  LOG IN TO REPLY
andrewaaa5
THREAD ­ STARTER
Goldmember
Avatar
1,225 posts
Joined Sep 2004
Location: scandinavia
     
Jul 17, 2007 15:33 |  #6

cosworth wrote in post #3560966 (external link)
I have considered doing this for my site to cater to highbandwidth and WUXGA users. Make 3 sites, one for 1024, one for 1440 and another for 1920 - all with properly resized images.

Only caveat here is that some people disable java.

<SCRIPT language="JavaScript">
<!--
if ((screen.width>=1024) && (screen.height>=768 ))
{
window.location="highr​es.html";
}
else
{
window.location="lowre​s.html";
}
//-->
</SCRIPT>

This javascript really works a treat in my tests on Mozilla in my set up, so thank to pointing me towards it. There is an issue though, on Internet Explorer it pops up with a 'warning' box that I am sure will scare off a few people :(

Also, I changed the sizing that you mentioned from this:
if ((screen.width>=1024) && (screen.height>=768 ))
to this:
if ((screen.width>=1280) && (screen.height>=1024))

The best solution just now is for me to 'sleep on it' and hopefully get a bright idea by the time I awake...


andrew crighton
website -- > www.butterpeanut.com (external link)
flickr -- > flickr/photos/andrewaa​a5 (external link)

  
  LOG IN TO REPLY
andrewaaa5
THREAD ­ STARTER
Goldmember
Avatar
1,225 posts
Joined Sep 2004
Location: scandinavia
     
Jul 22, 2007 08:43 |  #7

Ok, so I have made some test: If anyone wants to test, or give feed back I'd be grateful:

http://www.butterpeanu​t.com/temp3/ (external link)

if screen resolution is below 1280x1024, it should automatically redirect you to a 'lower res' page with smaller JPGs.

...what I am still annoyed about is the 'pop up' message that IE users get to 'allow blocked' content, but I guess IE just wants to play safe; understandable :)
there is also a 'splash' index page for those that have Java disabled - but that will take people to the 'hi res' page with no other options ( < bad move???)


andrew crighton
website -- > www.butterpeanut.com (external link)
flickr -- > flickr/photos/andrewaa​a5 (external link)

  
  LOG IN TO REPLY
tim
Light Bringer
Avatar
51,010 posts
Likes: 375
Joined Nov 2004
Location: Wellington, New Zealand
     
Jul 22, 2007 19:50 |  #8

I think you're going the wrong way with this. Unless it's absolutely necessary avoid active content. Why do you need to show high res images to people? Just show the low res, and provide a link to the high res image.


Professional wedding photographer, solution architect and general technical guy with multiple Amazon Web Services certifications.
Read all my FAQs (wedding, printing, lighting, books, etc)

  
  LOG IN TO REPLY
andrewaaa5
THREAD ­ STARTER
Goldmember
Avatar
1,225 posts
Joined Sep 2004
Location: scandinavia
     
Jul 23, 2007 03:55 |  #9

tim wrote in post #3592872 (external link)
I think you're going the wrong way with this. Unless it's absolutely necessary avoid active content. Why do you need to show high res images to people? Just show the low res, and provide a link to the high res image.

'BIG' is beautiful no??

well, actually that was a good suggestion that you made Tim... maybe oneday I will get around to implementing that...


andrew crighton
website -- > www.butterpeanut.com (external link)
flickr -- > flickr/photos/andrewaa​a5 (external link)

  
  LOG IN TO REPLY
tim
Light Bringer
Avatar
51,010 posts
Likes: 375
Joined Nov 2004
Location: Wellington, New Zealand
     
Jul 23, 2007 04:09 |  #10

www.jalbum.net (external link) - it will automatically create thumbnails, medium res images, and link to the original high res images if you tell it too. Takes no time to set up, great program.


Professional wedding photographer, solution architect and general technical guy with multiple Amazon Web Services certifications.
Read all my FAQs (wedding, printing, lighting, books, etc)

  
  LOG IN TO REPLY
andrewaaa5
THREAD ­ STARTER
Goldmember
Avatar
1,225 posts
Joined Sep 2004
Location: scandinavia
     
Jul 23, 2007 04:25 |  #11

tim wrote in post #3594716 (external link)
www.jalbum.net (external link) - it will automatically create thumbnails, medium res images, and link to the original high res images if you tell it too. Takes no time to set up, great program.

...looks like carp. i do not like using these 'made for the masses' album generators these days. thanks, but no thanks. although they are amazingly versatile, and fast, they take away a lot of individuality. ok, they do have their uses, and I do use them at times for quick webpage gallery creations, but try to avoid such applications (and the galleries they produce) if possible....

..sorry if this response seems harsh, it is not meant to be as harsh as it sounds...


andrew crighton
website -- > www.butterpeanut.com (external link)
flickr -- > flickr/photos/andrewaa​a5 (external link)

  
  LOG IN TO REPLY
tim
Light Bringer
Avatar
51,010 posts
Likes: 375
Joined Nov 2004
Location: Wellington, New Zealand
     
Jul 23, 2007 05:04 |  #12

JAlbum is infinitely configurable, especially if you know a little Java or shell scripting. I have a skin I wrote for my professional website. I really don't like flash galleries so I keep it simple.


Professional wedding photographer, solution architect and general technical guy with multiple Amazon Web Services certifications.
Read all my FAQs (wedding, printing, lighting, books, etc)

  
  LOG IN TO REPLY
andrewaaa5
THREAD ­ STARTER
Goldmember
Avatar
1,225 posts
Joined Sep 2004
Location: scandinavia
     
Jul 23, 2007 05:18 |  #13

tim wrote in post #3594797 (external link)
JAlbum is infinitely configurable, especially if you know a little Java or shell scripting. I have a skin I wrote for my professional website. I really don't like flash galleries so I keep it simple.

ok, will check when i get a spare afternoon. I've been so annoyed with 'instant' albums in the past that I have tried to avoid them.
..and I am only just getting my head around CSS and Java just now, but actually quite enjoying it :)


andrew crighton
website -- > www.butterpeanut.com (external link)
flickr -- > flickr/photos/andrewaa​a5 (external link)

  
  LOG IN TO REPLY
sponsored links (only for non-logged)

1,842 views & 0 likes for this thread, 4 members have posted to it.
Script to resize JPGs on webpage per frame size/or per screen resolution...
FORUMS Post Processing, Marketing & Presenting Photos RAW, Post Processing & Printing 
AAA
x 1600
y 1600

Jump to forum...   •  Rules   •  Forums   •  New posts   •  RTAT   •  'Best of'   •  Gallery   •  Gear   •  Reviews   •  Member list   •  Polls   •  Image rules   •  Search   •  Password reset   •  Home

Not a member yet?
Register to forums
Registered members may log in to forums and access all the features: full search, image upload, follow forums, own gear list and ratings, likes, more forums, private messaging, thread follow, notifications, own gallery, all settings, view hosted photos, own reviews, see more and do more... and all is free. Don't be a stranger - register now and start posting!


COOKIES DISCLAIMER: This website uses cookies to improve your user experience. By using this site, you agree to our use of cookies and to our privacy policy.
Privacy policy and cookie usage info.


POWERED BY AMASS forum software 2.58forum software
version 2.58 /
code and design
by Pekka Saarinen ©
for photography-on-the.net

Latest registered member was a spammer, and banned as such!
2876 guests, 134 members online
Simultaneous users record so far is 15,144, that happened on Nov 22, 2018

Photography-on-the.net Digital Photography Forums is the website for photographers and all who love great photos, camera and post processing techniques, gear talk, discussion and sharing. Professionals, hobbyists, newbies and those who don't even own a camera -- all are welcome regardless of skill, favourite brand, gear, gender or age. Registering and usage is free.