image_gd_close

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

includes/image.inc, строка 331

Версии
5 – 6
image_gd_close($res, $destination, $extension)

GD helper to write an image resource to a destination file.

▾ 3 функции вызывают image_gd_close()

image_gd_crop in includes/image.inc
Crop an image using the GD toolkit.
image_gd_resize in includes/image.inc
Scale an image to the specified size using GD.
image_gd_rotate in includes/image.inc
Rotate an image the given number of degrees.

Код

<?php
function image_gd_close($res, $destination, $extension) {
  $extension = str_replace('jpg', 'jpeg', $extension);
  $close_func = 'image'. $extension;
  if (!function_exists($close_func)) {
    return FALSE;
  }
  if ($extension == 'jpeg') {
    return $close_func($res, $destination, variable_get('image_jpeg_quality', 75));
  }
  else {
    return $close_func($res, $destination);
  }
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему