Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 12-09-2003, 10:09 AM   #1
acctman
Confirmed User
 
Join Date: Oct 2003
Location: Atlanta
Posts: 2,840
HTML/DHTML/Scripting & Image gurus...

I think my subject covered everyone that could possibly help. I have a question, does anyone know how to scale an image maintaining the aspect ratio of the image, with or close to 350h or 350w? I don't want to change the original image at.

Is there a HTML, DHTML or Script that will force a image to be displayed with a set ratio dimension?

I want to be able to load images into a table cell and not have to resize the images manually before hand, since users will be automatically uploading images.
acctman is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-09-2003, 10:11 AM   #2
Juicy D. Links
So Fucking Banned
 
Industry Role:
Join Date: Apr 2001
Location: N.Y. -Long Island --
Posts: 122,992
photoshop
Juicy D. Links is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-09-2003, 10:36 AM   #3
dotwind
Confirmed User
 
Join Date: Dec 2003
Location: Toronto
Posts: 285
you can even just set the width and height in the img tag that would show it with the desired width and height if you wanna keep the ratio i don't think hahahahahahahahahaha can do that i didn't look into it but it can be done easily with a server side script.

DW
__________________
Custom large/complex systems programing.<br>ASP.Net, C#, XML, MS SQL, WebServices(SOAP).<br>ICQ: 235719545
dotwind is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-09-2003, 11:49 AM   #4
pornanza
Confirmed User
 
Join Date: Jul 2003
Location: East Village
Posts: 238
you can just set &ltimg src="" width="350"&gt but each user will be downloading the full image = slow & more bandwidth

the following code will thumbnail the image

PHP Code:

 
function resize($width$image$photoFolder$thumbFolder) {
  
$size getimagesize("$photoFolder/$image");

  
$length = ($size[1] * round($width $size[0] * 100)) / 100;

  if (
$length $width) { $length $width$width = ($size[0] * round($length $size[1] * 100)) / 100; }

  
$source imagecreatefromjpeg("$photoFolder/$image");
  
$destination imagecreatetruecolor($width$length);

  
imagecopyresampled($destination$source0000$width$length$size[0], $size[1]);
  
imagejpeg($destination"$thumbFolder/$image"75);
 } 
ryan
__________________
Eskimo Hoe
QuickWank
Pornanza!
pornanza is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.