tempimg = "tmp/".uniqid(time()).".jpg"; imagejpeg ($image, $this->tempimg); imagedestroy($image); } function getBitmap() { $fp = fopen($this->tempimg,"rb"); $i = fread($fp,filesize($this->tempimg)); $bitmap = new SWFBitmap($i); fclose($fp); chmod($this->tempimg,755); unlink ($this->tempimg); return $bitmap; } } ?>