Skip to main content
GogetaX
Inspiring
Apr 6, 2018 10:51 PM UTC
Answered

CC 2018, Air php/jpeg encoding?

Hello everyone!

I am building a small project where i can make a snapshot and send it to my server using php communication.

I am pretty much done with everything that belongs to php and Actionscript 3.0 on my app.

But i do have problem, i have looked for an example of how to encode my bitmapData into PNG or JPG, non of those examples seems to be working becasue flash could not find those libraries when i compiling..

wich are:

com.adobe.images.PNGEncoder;

com.adobe.images.JPEGEncoder;

are those libraries not supposed to be in flash CC 2018? or do i need to download it from somewhere?

This topic is closed to new replies. Start a new post to keep the conversation going.
zwetan_ukCorrect answer
Inspiring
Apr 6, 2018 11:28 PM UTC

Look at BitmapData.encode() method

you will be able to chose a compressor for either PNG, JPG or JPGX
you will have to use min AIR 3.3 / Flash 11.3

2 replies

Colin Holgate
Inspiring
Apr 6, 2018 11:41 PM UTC

For your interest, there were old encoder classes, that may be what you found as example code. The newer encoder is a lot faster.

Translate
zwetan_ukCorrect answer
Inspiring
Apr 6, 2018 11:28 PM UTC

Look at BitmapData.encode() method

you will be able to chose a compressor for either PNG, JPG or JPGX
you will have to use min AIR 3.3 / Flash 11.3

Translate