language
change language to english
Download the FlashImageConverter script here:

FlashImageConverter Anleitung

I. INSTALLING PHP-FlashImageConverter:

Installation is quite simple if your server meets the following requirements:
 - PHP 4.x (or above) installed
 - gdLibrary version 2.x or above installed (see http://www.zend.com/manual/ref.image.php for an installaion manual)

If your system meets the above requirements you simply need to ftp the "convertImageToJpegStream.php" file to your webserver and your are ready to go.

II. USING PHP-FlashImageConverter:

Testing the installation:

Once you installed PHP-FlashImageConverter you can test it by calling the follwing URL (make sure to replace the text in <> with the values to match your environment):

http://<enter your domain name here>/<enter the path to the php file here>/convertImageToJpegStream.php?resampleWidth=100&imageToConvert=http://www.google.com/images/logo.gif
this URL-call should result in the google logo beeing displayed in your browser resized to a width of 100 pixels.

valid parameters to call the FlashImageConverter with:

There are several paramters that PHP-FlashImageConverter will interpret when the convertImageToJpegStream.php is called.
The pattern to call PHP-FlashImageConverter is always as follows:
    http://<enter your domain name here>/<enter the path to the php file here>/convertImageToJpegStream.php?imageToConvert=<imageURL>&<functionalparameter>=<value>

Mandatory parameters:

  • imageToConvert
    The parameter "imageToConvert" is mandatory, it specifies the image path on the same server or a complete image-URL on any public server on the internet.

Functional parameters:

The following parameters are optional.
They can NOT be combined, only one parameter will be interpreted, all other parameters will be ignored.
    
Note: In the example URLs it is assumed that an image file "test.jpg" with the dimensions width=400 and height=800 pixels resides in the same directory as the php script.

  • resampleWidth
    The parameter "resampleWidth" specifies the width the original image will be resized to before it will be delivered to the requesting client (either your browser or flash). The aspect ratio of the original image won't be changed.
            e.g. the url "(...)convertImageToJpegStream.php?imageToConvert=test.jpg&=resampleWidth=200" will return a copy of the image "test.jpg" (residing in the same directory as the php script) scaled to a width of 200 pixels and a height of 400 pixels (height is calculated using the aspect ration of the original image)
  • resampleHeight
    The parameter "resampleHeight" specifies the height the original image will be resized to before it will be delivered to the requesting client (either your browser or flash). The aspect ratio of the original image won't be changed.
            e.g. the url "(...)convertImageToJpegStream.php?imageToConvert=test.jpg&=resampleHeight=200" will return a copy of the image "test.jpg" (residing in the same directory as the php script) scaled to a height of 200 pixels and a width of 100 pixels (width is calculated using the aspect ration of the original image)
  • resampleFactor
    The parameter "resampleFactor" specifies the scale-factor to be applied to the original's image dimensions.
            e.g. a scale factor of 0.5 will resize the image to half-size, 2 will resize it to double size
            the url "(...)convertImageToJpegStream.php?imageToConvert=test.jpg&=resampleFactor=0.25" will return a copy of the image "test.jpg" (residing in the same directory as the php script) scaled to a height of 200 pixels and a width of 100 pixels
  • resampleMaxDimensionH and resampleMaxDimensionW
    The parameter-pair resampleMaxDimensionH/resampleMaxDimensionW allows you to specifiy a rectangualar boundary in which the image needs to be fitted in maximum possible size.
            These two parameters need to be provided combined, if only one of the two is provided, the funciton won't be executed since both parameters are needed.
            e.g. the url "(...)convertImageToJpegStream.php?imageToConvert=test.jpg&=resampleMaxDimensionH=200&resampleMaxDimensionW=200" will return a copy of the image "test.jpg" scaled to a height of 200 pixels and a width of 100 pixels.