Customizing SMF > Mod Requests

resize too large images

<< < (2/6) > >>

Owdy:
Nice images Seph|roth  :P  ;D

Seph|roth:

--- Quote from: Shoeb Omar on September 14, 2003, 12:09:07 PM ---GD can be used for image manipulation?  I always though ti was for image creation heh.

--- End quote ---
can be used for both


--- Quote from: Owdy on September 14, 2003, 12:09:41 PM ---Nice images Seph|roth  :P  ;D

--- End quote ---
thought you might like 'em ;)

Seph|roth:
I don't even think they use GD or something similar for this... i think they have a PHP script that checkes the posted img's width+height, let's say 300x600.. max allowed width is let's say 200 => the script calculates the appropriate height (in this case that will be 300 400 ;)) => and the script writes those values to the <img> tag. causing the browser to auto resize the img. Tha't why the img's will look a bit cluttered afterwards.. but you don't need any lib's for it this way.

Anyway, just a guess how i could be done maybe :P

Shoeb Omar:
Yes, but if the image size is smaller than the limit it will stretch it.. unles syou use javascirpt, or php to detect if it;s under the size

Seph|roth:

--- Quote from: Shoeb Omar on September 14, 2003, 05:30:19 PM ---Yes, but if the image size is smaller than the limit it will stretch it.. unles syou use javascirpt, or php to detect if it;s under the size

--- End quote ---
well, if it can detect the size (which it can ;)), you can ofcourse make it so that when it is smaller than max-width, it doesn't do anything...

Anyhow, i think this is how they do it a the forum i listed above...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version