Jump to content

[SOLVED] Aspect ratio


shage

Recommended Posts

this is what i use to resample on the fly with out GD its pretty good (getImageSize is it)

<?php
	$image = "myimage,/pg";
	$tempimg = 	getImageSize($image);
	$size = $tempimg[3];
	$size = explode("\"",$size);
	$width = $size[1];
	$height = $size[3];
while($height > $maxheight || $width > $maxwidth)
	{
		$width = .99*$width;
		$height = .99*$height;
	}
echo "<img src=\"myimage.jpg\" width=\"".$width."\" height=\"."$height."\" />";
?>

Link to comment
https://forums.phpfreaks.com/topic/59288-solved-aspect-ratio/#findComment-294562
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.