Function __global->cms_imagecreatefromstring

Definitions

sources/images.php

  • Load a GD image resource from a string.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$data string No No required parameter N/A N/A String to load from
$ext ?string No No Null N/A N/A File extension (null: unknown)

Returns

  • Image resource (false: error)
  • Type: ~resource
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Load a GD image resource from a string.
 *
 * @param  string $data String to load from
 * @param  ?string $ext File extension (null: unknown)
 * @return ~resource Image resource (false: error)
 */

function cms_imagecreatefromstring(string $data, ?string $ext = null)