View Single Post
Old 05-24-2007, 09:18 AM   #3 (permalink)
Jinn
Lover - Protector - Teacher
 
Jinn's Avatar
 
Location: Seattle, WA
Two things:

1) I see the function declaration, but where is the actual call? Do you have a separate block of code which calls it? I don't see you passing a height, width, target to imageResize. You get it with getimagesize, but never pass that value to the function? Also, without a function call, where is that return value going? It's going nowhere at the moment.

It looks like you're trying to accomplish something like:
PHP Code:
<img src="imgfilename" <?php imageResize($height$width$target); ?>>
2) You're not actually resizing the picture with this code. You are in the effect that you're causing the browser to render the picture at a shrunken size, but someone viewing the page still had to download the full size image, and then their browser shrunk it down. Changing HTML height and width tags only changes rendered size, not actual size.
__________________
"I'm typing on a computer of science, which is being sent by science wires to a little science server where you can access it. I'm not typing on a computer of philosophy or religion or whatever other thing you think can be used to understand the universe because they're a poor substitute in the role of understanding the universe which exists independent from ourselves." - Willravel

Last edited by Jinn; 05-24-2007 at 09:22 AM..
Jinn is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73