in reply to dereferencing problem
Briefly looking at your code, I would try removing all the \$ and $$ stuff and I think it will be a good start.
Use the return( $width, $height ); and get rid of the other one. Then in the main script you test like so.
if($height > 150 ) { # ... } elsif($width > 150) { # ... stuff here } # ... more stuff here
In this program you dont need any references just the regular values $var etc.
Update: You might also try scaling the images by the same percent instead of by the same numeric amount. Say its 200x100 then 150/200 is .75 so make the 100 dimension 75 (100*.75) instead of 50 (100-(200-150)) like the current code would.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: dereferencing problem
by NereDoWell (Initiate) on Mar 14, 2003 at 23:04 UTC |