Re: bitmapid in swf functions?

From: Date: Wed, 17 Jan 2001 09:38:54 +0000
Subject: Re: bitmapid in swf functions?
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-44330@lists.php.net to get a copy of this message
> These swf functions seem somewhat magical. Should swf_definebitmap() > somehow return a bitmapid? If not, where does the bitmapid parameter > needed by swf_getbitmapinfo() and swf_shapefillbitmapclip() come from? > They are a bit magical. You might want to have a look at: http://www.opaque.net/ming/, which provides an easier to use interface (I'm currently working with the author to contribute the PHP extension code to the php distribution, he's keen on the idea (ie, if you compile --with-swf --enable-ming, you get the mingswf extension, --with-swf or --with-swf --enable-libswf you get the libswf extension)). That library also works with windows and is constantly maintained (whereas Paul Haebaerli's libswf is not maintained anymore...). > I'm probably missing something obvious here. > You are, something obvious, but not intuitive... void swf_definebitmap(int objid, string image_name) Is the prototype for swf_definebitmap(), the first argument (objid) is the object id to use with swf_getbitmapinfo(), etc. ie, <?php // The bitmap id to define the bitmap with, and // then use with the other bitmap functions $pic_id = 10; // Komodo, Rasmus? *LOL*! From phpics.com ;) $pic_location = "korea/0.50/17.jpg"; // ... swf_definebitmap($pic_id, $pic_location); // ... $pic_info = swf_getbitmapinfo($pic_id); echo "Size of the bitmap in bytes is: $pic_info[size]\n"; echo "Width of the bitmap in pixels is: $pic_info[width]\n"; echo "Height of the bitmap in pixels is: $pic_info[height]\n"; ?> -Sterling

« previous php.dev (#44330) next »