Code Duplication    Length = 5-9 lines in 2 locations

htdocs/image.php 2 locations

@@ 449-457 (lines=9) @@
446
447
// Set up the appropriate image handling functions based on the original image's mime type
448
switch ($imageMimetype) {
449
    case 'image/gif':
450
        // We will be converting GIFs to PNGs to avoid transparency issues when resizing GIFs
451
        // This is maybe not the ideal solution, but IE6 can suck it
452
        $output_function = 'imagepng';
453
        $imageMimetype = 'image/png'; // We need to convert GIFs to PNGs
454
        $do_sharpen = false;
455
        $quality = round(10 - ($quality / 10)); // We are converting the GIF to a PNG and PNG needs a compression
456
                                                // level of 0 (no compression) through 9 (max)
457
        break;
458
    case 'image/png':
459
        $output_function = 'imagepng';
460
        $do_sharpen = false;
@@ 458-462 (lines=5) @@
455
        $quality = round(10 - ($quality / 10)); // We are converting the GIF to a PNG and PNG needs a compression
456
                                                // level of 0 (no compression) through 9 (max)
457
        break;
458
    case 'image/png':
459
        $output_function = 'imagepng';
460
        $do_sharpen = false;
461
        $quality = round(10 - ($quality / 10)); // PNG needs a compression level of 0 (no compression) through 9
462
        break;
463
    case 'image/jpeg':
464
        $output_function = 'imagejpeg';
465
        $do_sharpen = true;