Вход Регистрация
Файл: modules/obmen/inc/file/jpg.php
Строк: 30
<?php

if (!is_file(LF_PATH . '.JPG') && $imgc = @imagecreatefromjpeg(LF_PATH)) {
    
$img_x = imagesx($imgc);
    
$img_y = imagesy($imgc);

    
$x_ratio = SCR_WIDTH / $img_x;
    if (
$img_x <= SCR_WIDTH) {
        
$dstW = $img_x;
        
$dstH = $img_y;
    } else {
        
$dstH = ceil($x_ratio * $img_y);
        
$dstW = SCR_WIDTH;
    }
    
$screen = imagecreatetruecolor($dstW, $dstH);
    
imagecopyresampled($screen, $imgc, 0, 0, 0, 0, $dstW, $dstH, $img_x, $img_y);
    
imagedestroy($imgc);
//$screen=img_copyright($screen); // наложение копирайта
    
imagejpeg($screen, LF_PATH . '.JPG', 95);
    
imagedestroy($screen);
}

include 
'inc/screens.php';

echo 
"<div class = 'comm'>";
if (
$file_id['opis']) {
    echo 
"<font color = 'green'>";

    echo 
text::toOutput($file_id['opis']);

    echo 
"</font><br />n";
}

echo 
"<div class = 'hr'></div><small>";
if (
function_exists('getimagesize')) {
    
$img_size = getimagesize($file);
    echo 
"Разрешение изображения: <font color = 'green'>$img_size[0]x$img_size[1] пикс.</font><br />n";
    echo 
"<script type='text/javascript'> document.write('Ваше разрешение: <b>'+screen.width+'×'+screen.height+'</b>'); </script><br />";
}

echo 
"Добавлен: <font color = 'green'>" . date::times($file_id['time']) . "</font><br />n";
echo 
"Размер: <font color = 'green'>" . size_file($size) . "</font>";
echo 
"</small></div>";
Онлайн: 2
Реклама