Resize image without lose quality when image is bigger then 3000px
<p>i have script to resize my upload image without losing quality but when its about more then 3000 pixels wide/hight it dont resize. I try to set values in httaccess but nothing changes.<br><br>
<strong>Here is the script:</strong></p>

<pre><code>$filename = "image.jpg";
    // Set a maximum height and width
    $width = 490;
    $height = 800;

    header('Content-Type: image/jpeg');

    list($width_orig, $height_orig) = getimagesize($filename);

    $ratio_orig = $width_orig / $height_orig;

    if ($width / $height &gt; $ratio_orig) {
        $width = $height * $ratio_orig;
    } else {
        $height = $width / $ratio_orig;
    }

    // Resample
    $image_p = imagecreatetruecolor($width, $height);
    $image = imagecreatefromjpeg($filename);
    imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);

    // Output
    imagejpeg($image_p, "image_resized.jpg", 100);
</code></pre>

<p><br><br><strong>and .htacces i tried:</strong><br><br></p>

<pre><code>php_value memory_limit 24M
php_value upload_max_filesize 10M  
php_value post_max_size 10M  
php_value max_input_time 300  
php_value max_execution_time 300 
</code></pre>
