function do_image_open($filename)
{
    // Disable interlacing for the generated images, as we do not need progressive images
    // if PDF files (futhermore, FPDF does not support such images)
    $image = do_image_open_wrapped($filename);
    if (!is_resource($image)) {
        return null;
    }
    if (!is_null($image)) {
        imageinterlace($image, 0);
    }
    return $image;
}
Beispiel #2
0
function do_image_open($filename, &$type)
{
    // Gracefully process missing GD extension
    if (!extension_loaded('gd')) {
        return null;
    }
    // Disable interlacing for the generated images, as we do not need progressive images
    // if PDF files (futhermore, FPDF does not support such images)
    $image = do_image_open_wrapped($filename, $type);
    if (!is_resource($image)) {
        return null;
    }
    if (!is_null($image)) {
        imageinterlace($image, 0);
    }
    return $image;
}