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/ > > >