Jan,

thanks for the hint on the native methods! I indeed missed that and used the old encoder from the AS3CoreLib! Sounds promising; I'll give it a try. And probably later will dive into workers also; another option I ignored so far ;-)

Regards

Hans


Am 29.01.2018 um 16:34 schrieb Weber Jan:
Also have a look at the inbuild encoders, which do not require an ANE and are 
pretty fast:

PNGEncoderOptions
https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/PNGEncoderOptions.html

JPEGEncoderOptions
https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/JPEGEncoderOptions.html

var compressor : PNGEncoderOptions = new PNGEncoderOptions();
compressor.fastCompression = true; // optional


var bitmapData : BitmapData;
bitmapData.encode(new Rectangle(0, 0, bitmapData.width, bitmapData.height), 
compressor, byteArray);





-----Ursprüngliche Nachricht-----
Von: Hans Nuecke [mailto:hnue...@vservu.de]
Gesendet: Montag, 29. Januar 2018 00:36
An: users@flex.apache.org
Betreff: Re: Quick CameraRoll Question

Quick update:

I had a short email exchange with Distriqt, and the actual situation of their 
"IMAGE" ANE (JPG/PNG decoder/encoder) is this:

"There is no performance gains on Windows or macOS for the image ANE currently.

It is one of the ANEs on our agenda for this year."

Actually I'm mostly intersted in a Windows and OSx version; that's why I had 
checked with Distriqt and that's what there statement is addressing.
Cheers
Hans





Mit freundlichen Grüßen / Best Regards
i.A. Jan Weber
Software Development



Contact:


Location:


Head & Accounts Office:


tel


+49 941 8700 326


Bahnhofstr. 16


Bahnhofstr. 16


fax



93047 Regensburg


93047 Regensburg


mail


jan.we...@dallmeier.com<mailto:jan.we...@dallmeier.com>


Germany


Germany


[banner]
<http://www.dallmeier.com/index.php?id=1054>


Subscribe to our Newsletter<http://www.dallmeier.com/index.php?id=322&L=1>


www.dallmeier.com<http://www.dallmeier.com/en/home.html>


Social Media<http://www.dallmeier.com/index.php?id=292&L=1>



Dallmeier electronic GmbH & Co.KG

CEO:
Registry Court:
VAT ID:
Unlimited Partner:
Registry Court:


          Dieter Dallmeier
          Amtsgericht Regensburg HRA 6827
          DE813790649
          Dallmeier GmbH
          Amtsgericht Regensburg HRB 9085





Am 26.01.2018 um 17:44 schrieb Erik J. Thomas:
Yes, there is a better, faster way of encoding/decoding bitmaps using an ANE:

https://airnativeextensions.com/extension/com.distriqt.Image 
<https://airnativeextensions.com/extension/com.distriqt.Image> - This Image 
extension allows developers to encode and decode image data with native code. The 
extension provides the ability to encode/decode, save/load image data both 
synchronously and asynchronously. Using native functionality to encode image data 
will significantly increase the speed of saving image data to the device.

There are probably others out there. While I haven't used this particular ANE, 
I have been using the QR Scanner, Push Notifications, Fingerprint Auth, Native 
Dialogs, Native StageView, and PDF Viewer ANEs from Distriqt and can vouch they 
are well supported, work as advertised, are kept up to date with every new OS 
version, and work across iOS and Android with the APIs.

Another approach we use for one app where we need to save the image to an asset 
server, we upload the data and do the conversions on our java-based web service 
hosted on super fast hardware and offload that job from the mobile device and 
return the URL and display that in the app. It's actually faster that encoding 
on older phones and this app shares captured photos among all connected users 
so it makes sense not to bother encoding on the device.

Erik

On Jan 26, 2018, at 1:50 AM, Hans Nuecke <hnue...@vservu.de> wrote:

Eric,

is there a better (faster) way for JPG/PNG encoding/decoding than using as3corelib 
<https://github.com/mikechambers/as3corelib> (which is not maintained for more 
than 7 years now)?

Thanks

Hans



Am 26.01.2018 um 01:49 schrieb Erik J. Thomas:
Unfortunately, the flash CameraRoll (which is truly great) doesn't provide what 
you need in this scenario.

I think you have three options:

1. Respond to the "select" event and if the file is unsupported, pop a message 
and allow them to select another file. Make sure your app UI preps the user about what 
image types are supported. However, this is a sticky wicket when only supporting one 
image type when all other apps in the world support at least png and jpg, and often bmp, 
etc.

2. Change your app to support png format which is a really good idea anyway, 
and use #1 if they select a video.

3. Use an ANE that supports a filter.

I do not see any option in flash CameraRoll to establish a file type filter. 
But consider that mobile apps are about easy stuff. So supporting both png and 
jpeg at a minimum will increase the value of your app by a lot. If you need any 
help using the 2d library to manipulate jpg and png, I can help. I've written a 
lot of raw bitmap manipulation logic through the years, both jpg and png. In 
fact, if you really need to only support jpg, you can convert your png to a 
jpg, though it takes a little time on a mobile device, measured in seconds if 
it's large.

Cheers,

Erik

On Jan 24, 2018, at 10:11 PM, bilbosax <waspenc...@comcast.net> wrote:

My app needs to be able to import an image that the user selects from the
cameraroll.  But my app is not capable of handling a video or a PNG, only
JPG files.  Is there a way when you browse the cameraroll, that you can
specify it to only show the JPG images that the user has, and not all the
various image types that they may have??

Thanks!



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/







--

Reply via email to