dgitarist
Guest
трабл в выводе картинок
привет парни
у мя есть скрипт
<?
$img=imageCreateFromJpeg($image);
$imgX = @ImageSX($img);$imgY = @ImageSY($img);
switch($l){
case 1:
$x = 50; $y = 60;
break;
case 2:
$x = 161; $y = 197;
break;
case 3:
$x = 57;$y = 71;
break;
case 4:
$x = 70;$y = 80;
break;
default:
$x = 76; $y = 54;
break;
}
$widthRatio=$imgX/$x; $heightRatio=$imgY/$y;
if ($widthRatio >= $heightRatio) $ratio=$widthRatio; else $ratio=$heightRatio;
$newWidth=$imgX/$ratio; $newHeight=$imgY/$ratio;
$newImg = ImageCreateTrueColor($newWidth, $newHeight);
header("Content-type:image/jpeg");
imageCopyResampled($newImg,$img,0,0,0,0,($newWidth),($newHeight),$imgX,$imgY);
///////////////////////////
imageinterlace($img,1);
ивот эта функция не пашет ! !
т.е. нет сообшений об ошибках, но картинки не грузятся построчно! ! как исправить
///////////////////////////
imagejpeg($newImg);
?>
привет парни
у мя есть скрипт
<?
$img=imageCreateFromJpeg($image);
$imgX = @ImageSX($img);$imgY = @ImageSY($img);
switch($l){
case 1:
$x = 50; $y = 60;
break;
case 2:
$x = 161; $y = 197;
break;
case 3:
$x = 57;$y = 71;
break;
case 4:
$x = 70;$y = 80;
break;
default:
$x = 76; $y = 54;
break;
}
$widthRatio=$imgX/$x; $heightRatio=$imgY/$y;
if ($widthRatio >= $heightRatio) $ratio=$widthRatio; else $ratio=$heightRatio;
$newWidth=$imgX/$ratio; $newHeight=$imgY/$ratio;
$newImg = ImageCreateTrueColor($newWidth, $newHeight);
header("Content-type:image/jpeg");
imageCopyResampled($newImg,$img,0,0,0,0,($newWidth),($newHeight),$imgX,$imgY);
///////////////////////////
imageinterlace($img,1);
ивот эта функция не пашет ! !
т.е. нет сообшений об ошибках, но картинки не грузятся построчно! ! как исправить
///////////////////////////
imagejpeg($newImg);
?>