Import memory images

Informations

Author: Xavier Nicolay
License: Freeware

Description

This script allows to display images that are loaded in memory without the need of temporary files. There are 2 main usages:

- When an image is retrieved from a database
- When an image is created with GD

MemImage(string data, float x, float y [, float w [, float h, [array link]]])

$data holds the image in memory. It must be in PNG format.

GDImage(resource im, float x, float y [, float w [, float h, [array link]]])

$im is a GD identifier. If you use JpGraph, you can retrieve it via a call to $graph->Stroke(_IMG_HANDLER) (from version 1.10.1).

Moreover, this script allows to call the standard Image() method with a URL of the form:

var://variable

where variable is a global variable holding an image (PNG or JPEG). This feature requires PHP>=4.3.2 and FPDF>=1.52.