Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Resize image width & height...

by Petras (Friar)
on Jun 28, 2003 at 13:49 UTC ( #269859=note: print w/ replies, xml ) Need Help??


in reply to Resize image width & height...

It may make me look like an evil anti-perl (I can feel the downvotes coming!), but you could actually do the whole thing with JavaScript. screen.width and screen.height return int values for with width and height of the screen in pixels. Depending on the user's resolution you could proportionately scale down from the original image size.

But a real monk would take the time to learn to do it in Perl! (that's my anti-downvote disclaimer ;)

Perlway or the highway,
Petras


Don't worry about people stealing your ideas. If your ideas are any good, you'll have to ram them down people's throats.

-Howard Aiken


Comment on Re: Resize image width & height...
Re^2: Resize image width & height...
by adrianh (Chancellor) on Jun 28, 2003 at 13:55 UTC

    I had assumed that the OP had actually wanted to resize the raw graphic. If they just want to change the displayed size surely just munging the width/height attributes of the img tag would be simpler?

      Um, yeah, if the goal is to change the raw graphic file then someone with a lot more experience than me would have to post something! But the SOP read like the goal was to change the size of the graphic based on the users screen settings. I might have misinterpretted. The (*gulp for non-Perl*) js option would automate the munging. I'll look the SOP over again and see where I read wrong c",)
      Cheers,
      P
      Don't worry about people stealing your ideas. If your ideas are any good, you'll have to ram them down people's throats.

      -Howard Aiken

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://269859]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (10)
As of 2014-09-15 04:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (145 votes), past polls