I haven't used amfphp extensively, but it might be a problem in the type
of data amfphp expects... I'm not sure this is a good idea:
ba.toString()
As with a JPG you'll sure get lots of 0's in the ByteArray; parsed as a char
in a string, a 0 value is what's known as an embedded null, which
When I use ba without toString() amfphp says Object of class ByteArray
could not be converted to string.
I think there is something to be done in the php to convert the data back
from string into binary data, but I cannot find it out.
Ideas?
On Sat, Aug 16, 2008 at 9:02 PM, Juan Pablo Califano
Maybe you don't have a version of amfphp that supports AS 3.0 objects...
Check this out:
http://www.sephiroth.it/tutorials/flashPHP/amfphp_bytearray/
On the other hand, if using amfphp is not a requirement, you could just use
the class I posted, and handle things from the php side as if it were
Hi,
Sorry, I put this in the wrong thread before - here is my 2c
Hi,
There are a few examples on the www about sending Bitmap data to the
server Mario's is a good starting point -
http://www.quasimondo.com/archives/000572.php Anyway, there are
other examples about which do
I see, all those tutorials shows how to save the image on the Hard Drive
(now with flash player is possible to do this without any server side
script).
But considering my question, what I should be putting in my database row,
the byteArray encoded by JPGEncoder?
Is there a method into this class
Hi,
You can't save an image from Flash without a server side script...
Mario's example sends an image to the server, then uses
FileReference to download it, or something similar. If you want to
store the image data, you would need to have 2 scripts - one to format
it nicely and then
I mean that You can save files to HDD now without using server side script
with the new flash player 10.
On Fri, Aug 15, 2008 at 6:16 PM, Glen Pike [EMAIL PROTECTED]wrote:
Hi,
You can't save an image from Flash without a server side script...
Mario's example sends an image to the
Glen, thanks for your help, I actually wanna store the Image in a mysql
database and not uploading it somewhere in my server.
On Fri, Aug 15, 2008 at 6:48 PM, Omar Fouad [EMAIL PROTECTED] wrote:
I mean that You can save files to HDD now without using server side script
with the new flash
With the newest player, I think, it's possible to save data into the USER's
hard drive without a trip to the server, but you want to store the data on
the server side, you need to send it to the server...
You have to post that data using a URLLoader object, and specifying the
input as binary
Glen, thanks for your help, I actually wanna store the Image
in a mysql database and not uploading it somewhere in my server.
You'll still need to upload it to your server first. Your server-side script
can then send it to the database.
Dave Watts, CTO, Fig Leaf Software
I guess I can send the ByteArray to the php that will handle its insertion
to the database. Right?
On Fri, Aug 15, 2008 at 7:07 PM, Juan Pablo Califano
[EMAIL PROTECTED] wrote:
With the newest player, I think, it's possible to save data into the USER's
hard drive without a trip to the server,
I guess I can send the ByteArray to the php that will handle
its insertion to the database. Right?
Yes, as long as your database drivers support that.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
Fig Leaf Software provides the highest caliber vendor-authorized
instruction at
Yes. Using that particular class I mentioned, from the php side you'd
receive the data like a regular html form post with multipart-encode, that
means, you can retrieve the text variables you want to send with
$_POST['someVar'] and the file (or files) with $_FILES['varName'] (or the
name you
Thanks.. I will try this now and feed you back.
On Sat, Aug 16, 2008 at 1:41 AM, Juan Pablo Califano
[EMAIL PROTECTED] wrote:
Yes. Using that particular class I mentioned, from the php side you'd
receive the data like a regular html form post with multipart-encode, that
means, you can
Hello all,
I was wondering if I can get the binary data from a bitmap data, and send it
to database (blob) or/and getting the binary data from the database and in
flash reform it to display the bitmap back.
I've been reading about the ByteArray Class but I am still confused whether
to use it or
You can use the getPixels() method of the BitmapData class to get the raw
pixel data as a ByteArray. Using setPixels() you can fill a BitmapData
object with data from a ByteArray.
You can post / retrieve that data from a server using a URLRequest object,
specifying that you want to use a binary
You mean it is not the same bandwidith taken as when loading the picture
from a directory in a server?
On Thu, Aug 14, 2008 at 6:59 PM, Juan Pablo Califano
[EMAIL PROTECTED] wrote:
You can use the getPixels() method of the BitmapData class to get the raw
pixel data as a ByteArray. Using
On Thu, Aug 14, 2008 at 10:56 PM, Omar Fouad [EMAIL PROTECTED] wrote:
You mean it is not the same bandwidith taken as when loading the picture
from a directory in a server?
It's a different encoding. You could encode it to, say, png before
sending it back, or use zlib compression.
Mark
Well, that depends on the picture, but yes, generaly you'd load a jpg, png,
etc, which are compressed formats. For instance, right now I'm seeing a 466
x 468 jpg. Its size is 34 Kb. Bear in mind that the compression ratio varies
depending on the actual image and the compression rate / algorithm
Compress it to a PNG or a JPEG - these formats will output a tidy ByteArray
for you. If you don't have AMF or trouble with writing HTTP Post headers,
you can always pack it into a Base64 encoded string.
Use Loader.loadBytes() to load it. This is in fact synchronous but occurs
asynchronously. I
20 matches
Mail list logo