image_gd_close

  1. drupal
    1. drupal6
Versionen
drupal6 image_gd_close($res, $destination, $extension)

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

Übergabeparameter

$res An image resource created with image_gd_open().

$destination A string file path where the iamge should be saved.

$extension A string containing one of the following extensions: gif, jpg, jpeg, png.

Rückgabewert

Boolean indicating success.

Verwandte Themen

▾ 3 functions call image_gd_close()

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

Code

includes/image.gd.inc, line 205

<?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);
  }
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen