| Package | com.candymandesign.image |
| Class | public class ImageExport |
mx.graphics.codec.JPEGEncoder
and mx.graphics.codec.PNGEncoder
and change just one line of the code in the toJPG function.
In order to see the PHP code, call tracePHP function.
See also
| Method | Defined by | ||
|---|---|---|---|
|
Constructor.
| ImageExport | ||
|
toJPG($source:DisplayObject, $pathToPHP:String, $quality:Number = 80):void
[static]
Export DisplayObject to valid JPG file.
| ImageExport | ||
|
toPNG($source:DisplayObject, $pathToPHP:String):void
[static]
Export DisplayObject to valid PNG file.
| ImageExport | ||
|
tracePHP():void
[static]
Traces PHP code you will need to use in order to see the result.
| ImageExport | ||
| ImageExport | () | constructor |
public function ImageExport()Constructor.
| toJPG | () | method |
public static function toJPG($source:DisplayObject, $pathToPHP:String, $quality:Number = 80):voidExport DisplayObject to valid JPG file. Usage example:
import com.candymandesign.image.ImageExport;
var pathToPHPFile:String = "http://localhost/displayImage/display.php";
ImageExport.toJPG(my_mc, pathToPHPFile, 100);
$source:DisplayObject — - DisplayObject you want to convert to JPG.
|
|
$pathToPHP:String — - Path to PHP file.
|
|
$quality:Number (default = 80) — - quality of the exported jpg.
|
| toPNG | () | method |
public static function toPNG($source:DisplayObject, $pathToPHP:String):voidExport DisplayObject to valid PNG file. Usage example:
import com.candymandesign.image.ImageExport;
var pathToPHPFile:String = "http://localhost/displayImage/display.php";
ImageExport.toPNG(my_mc, pathToPHPFile);
$source:DisplayObject — - DisplayObject you want to convert to JPG.
|
|
$pathToPHP:String — - Path to PHP file.
|
| tracePHP | () | method |
public static function tracePHP():voidTraces PHP code you will need to use in order to see the result. Usage example:
import com.candymandesign.image.ImageExport;
ImageExport.tracePHP();//traces PHP code.