note 13010 deleted from function.swfbitmap by danbrown

From: Date: Fri, 28 Nov 2008 20:31:34 +0000
Subject: note 13010 deleted from function.swfbitmap by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-147220@lists.php.net to get a copy of this message
Note Submitter: hotkey at hehe dot com ---- To insert bitmaps, don't use the as syntax given in this documentation, due to OPAQUE changed the usage of SWFBitmaps: You need to give binary data as argument! In addition to that, you can now just "swf->add()" Bitmaps; you don't need to create a rect-shape and fill it. So just try this: ================== $fp = fopen($filename,"r"); $i = fread($fp,999999); $img = new SWFBitmap($i); #don't give "fread(...)" as argument, but buffer it. fclose($fp); $swf->add($img); #this will create a shape with perfect proportions and fills it ================= Hope, that will prevent some suicides of desperate coders... ;) HotKey - http://www.SPR.AT

« previous php.notes (#147220) next »