// ----------- $handle->image_convert = 'jpg'; $handle->jpeg_quality = 10; TestProcess($handle, 'JPG quality set to 10%', "\$foo->image_convert = 'jpg';\n\$foo->jpeg_quality = 10;"); // ----------- $handle->image_convert = 'jpg'; $handle->jpeg_quality = 80; TestProcess($handle, 'JPG quality set to 80%', "\$foo->image_convert = 'jpg';\n\$foo->jpeg_quality = 80;"); // ----------- $handle->image_convert = 'png'; $handle->png_compression = 0; TestProcess($handle, 'PNG compression set to 0 (fast, large files)', "\$foo->image_convert = 'png';\n\$foo->png_compression = 0;"); // ----------- $handle->image_convert = 'png'; $handle->png_compression = 9; TestProcess($handle, 'PNG compression set to 9 (slow, smaller files)', "\$foo->image_convert = 'png';\n\$foo->png_compression = 9;"); } else { // if we are here, the local file failed for some reasons echo '<b>local file error</b><br />'; echo 'Error: ' . $handle->error . ''; } } } } } } echo '<p class="result"><a href="index.html">do another test</a></p>'; if (isset($handle)) { echo '<pre>'; echo $handle->log; echo '</pre>';
TestProcess($handle, 'watermark on greyscale pic, absolute position', "\$foo->image_watermark = 'watermark.png';\n\$foo->image_watermark_x = 10;\n\$foo->image_watermark_y = 10;\n\$foo->image_greyscale = true;"); // ----------- $handle->image_convert = 'jpg'; $handle->jpeg_size = 3072; TestProcess($handle, 'desired JPEG size set to 3KB', "\$foo->image_convert = 'jpg';\n\$foo->jpeg_size = 3072;"); // ----------- $handle->image_convert = 'jpg'; $handle->jpeg_quality = 10; TestProcess($handle, 'JPG quality set to 10%', "\$foo->image_convert = 'jpg';\n\$foo->jpeg_quality = 10;"); // ----------- $handle->image_convert = 'jpg'; $handle->jpeg_quality = 80; TestProcess($handle, 'JPG quality set to 80%', "\$foo->image_convert = 'jpg';\n\$foo->jpeg_quality = 80;"); } else { // if we are here, the local file failed for some reasons echo '<fieldset>'; echo ' <legend>local file error</legend>'; echo ' Error: ' . $handle->error . ''; echo '</fieldset>'; } } if (!$cli) {