KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.62
System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64
User : www ( 80)
PHP Version : 8.3.8
Disable Function : NONE
Directory :  /domains/afglcweb/ny/sites/all/modules/imageapi/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /domains/afglcweb/ny/sites/all/modules/imageapi/imageapi_gd.install
<?php
// $Id: imageapi_gd.install,v 1.8 2008/08/01 18:52:22 dopry Exp $

function imageapi_gd_requirements($phase) {
  $requirements = array();
  $t = get_t();
 
  $gd = function_exists('imagegd2');

  if (!$gd) {
    $requirements['imageapi_gd'] = array(
      'title' =>  $t('GD library'),
      'value' => $t('Not installed'),
      'severity' => REQUIREMENT_ERROR,
      'description' => $t('The GD library for PHP is missing or outdated. Please check the <a href="@url">PHP image documentation</a> for information on how to correct this.', array('@url' => 'http://www.php.net/manual/en/image.setup.php')),
    );
    return $requirements;
  } 

  // report version.
  $info = gd_info();
  $requirements['imageapi_gd'] = array(
    'title' =>  $t('GD library'),
    'value' => $info['GD Version'],
    'severity' => REQUIREMENT_OK,
  );

  // Check image format support 
  foreach (array('gif', 'jpeg', 'png') as $format) {
    if (function_exists('imagecreatefrom'. $format)) continue;
    $requirements['imageapi_gd_'. $format] = array(
      'title' => $t('GD !format Support', array('!format' => drupal_ucfirst($format))),
      'value' => $t('Not installed'),
      'severity' => REQUIREMENT_ERROR,
      'description' => $t('PHP GD was not compiled with %format support.', array('%format' => $format)), 
    );
  }


  // check non required stuff aka not installation blockers.
  if ($phase == 'runtime') {
    if (!function_exists('imagerotate')) {
      $requirements['imageapi_gd_imagerotate'] = array(
        'title' => $t('GD Image Rotation'),
        'value' => $t('Low Quality / Poor Performance'),
        'severity' => REQUIREMENT_WARNING,
        'description' => $t('The installed version of PHP GD does not support image rotations. It was probably compiled using the official GD libraries from http://www.libgd.org instead of the GD library bundled with PHP. You should recompile PHP --with-gd using the bundled GD library. See: @url. An implementation of imagerotate in PHP will used in the interim.',  array('@url' => 'http://www.php.net/manual/en/image.setup.php')),
      );
    }

    if (!function_exists('imagefilter')) {
      $requirements['imageapi_gd_imagefilter'] = array(
        'title' => $t('GD Image Filtering'),
        'value' => $t('Low Quality / Poor Performance'),
        'severity' => REQUIREMENT_WARNING,
        'description' => $t('The installed version of PHP GD does not support image filtering(desaturate, blur, negate, etc). It was probably compiled using the official GD libraries from http://www.libgd.org instead of the GD library bundled with PHP. You should recompile PHP --with-gd using the bundled GD library. See @url. An implementation of imagefilter in PHP will be used in the interim.',  array('@url' => 'http://www.php.net/manual/en/image.setup.php')),
      );
    }

    $memory_limit = ini_get('memory_limit');
    
    if (parse_size($memory_limit) < parse_size('96M')) {
      $requirements['imagecache_memory_limit'] = array(
        'title' => $t('ImageAPI GD Memory Limit'),
        'value' => $memory_limit,
        'severity' => REQUIREMENT_WARNING,
        'description' => $t('It is highly recommended that you set you PHP memory_limit to 96M to use ImageAPI GD. A 1600x1200 images consumes ~45M of memory when decompressed and there are instances where ImageAPI GD is operating on two decompressed images at once.'),
      );
    }

  }
  return $requirements;
}

/**
 * Implementation of hook_uninstall().
 */
function imageapi_gd_uninstall() {
  variable_del('imageapi_jpeg_quality');
}

Anon7 - 2021