image_gd_open

  1. drupal
    1. drupal6
Versionen
drupal6 image_gd_open($file, $extension)

GD helper function to create an image resource from a file.

Übergabeparameter

$file 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

An image resource, or FALSE on error.

Verwandte Themen

▾ 3 functions call image_gd_open()

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 184

<?php
function image_gd_open($file, $extension) {
  $extension = str_replace('jpg', 'jpeg', $extension);
  $open_func = 'imageCreateFrom' . $extension;
  if (!function_exists($open_func)) {
    return FALSE;
  }
  return $open_func($file);
}
?>

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