Native Image Encoding API’s - BitmapData to ByteArray (PNG,JPG)
Reading the comments on my blog post on CURL BenchMarketing I might be very wrong about the market need for native image encoding. I would like to better understand the need for this as a feature and gather feedback from the community.
Image Encoding Feature Request
Encode a BitmapData Object to PNG, JPG ByteArray with a native API.
Example:
import flash.image.JPEG;
import flash.image.PNG32;
myJPG:ByteArray = new JPEG( bitmapData , 300, 300, 80 );
myPNG:ByteArray = new PNG32( bitmapData , 1500, 1260 );
Formats: PNG, JPG
Focus in order of importance:
- Performance of the translation
- Quality of the Encoding to PNG, JPG Standards
As Flash Player 10 supports writing data to the local machine, Image encoding may become a bottleneck feature for many customers. As data no longer needs to traverse the network for security purposes, it makes sense to allow easy creation of native image formats in Flash Player and AIR.
If you would like to see a feature like this implemented within Flash Player, please post your name, company, and thoughts in the comments below.
Cheers,
Ted ![]()
FLEXJOB: CNET Networks Flex GIG
CNET Networks in San Francisco has a great opportunity for a software
engineer in our data warehouse group. Here is a link to the job
description.

You can apply directly via the link, or contact Hilary Straw directly at 415-344-2371
CNET on Flex!
Ted ![]()
CURL BenchMarketing
CURL released a language performance benchmark and press release highlighting how much faster their language is than ActionScript 3. At first glance it seemed very impressive, 8X faster than ActionScript WOW but looking deeper this is mostly irrelavent. The first thing that struck me was that the benchmark was for encoding a JPG image, not rendering it or uploading it but iterating over each pixel and translating it to another image type, JPG.
Here are my issues with this:
1. Name a single mainstream RIA that encodes a JPG?
Uploading a JPG - Important
Rendering a JPG - Critical
Encoding a JPG - Not essential
We support Encoding in the Flex Framework to allow image conversion but it is far from a mainstream feature. It is an API that is useful on projects where one needs to convert from the native DisplayList BitmapData format to other web image standards like PNG, GIF, JPG.
Flash Player supports imaging directly in the runtime so you can create images from any content in the Flash Player as native objects. There is no need to encode these as JPGs EVER and the speed is lightening fast actually it is far faster than any of the CURL results by an order of magnitude.
2. How much market reach does CURL have? Are they installed on 50%, 40%, 30%, 20%, 10%, 5%, 1% of computers?
The ability to run applications seamlessly without installing anything is the key to Flash Player’s adoption for RIA’s (one use of many). Flash Player 9 is installed on over 98% of computers. Flash Player 9 is on 98% of computers!!! I have NO reach statistics for CURL but they are not even on the radar! NOT ON THE RADAR!!! (Maybe that is why they needed to do a press release)
3. Code execution - There are a ton of dependencies in benchmarking and I know for a fact that you can make small changes in code will yield dramatically faster code execution. For instance in Flash Player 10 we added support for Vector (Typed Arrays) and simply swapping an Array for a Vector can result in 20X performance gains when iterating over data. The fact is that Flash Player is wicked fast and as computers increase in performance the gains are seen in the shipping Flash Player.
I keep seeing other runtimes benchmark against Flash Player but they do so within the performance vacuum and do not take into account reach, rendering performance, cross-platform, and compatibility aspects. Every developer wants to use the fastest language but the reality is that the language most compatibly installed eventually wins out. Both JavaScript and ActionScript are gaining adoption rapidly because they are widely available, not because they set land speed records for image encoding.
If I was choosing a runtime to bet my business on, I would bet on Flash Player because end users do not have to install a thing, it just works. That is not true with CURL, GEARS, Silverlight, and JAVA. Next time you see someone touting that they run faster, ask them what % of machines is that runtime compatibly installed on today.
Duhhhhhhhhh… Flash Player it just works!
Ted ![]()
Sometimes cornerRadius just isn’t enough
Two tips for coders new to Flex… if you want to have rounded corners in mx.containers like VBox, HBox, Canvas, etc, set the borderStyle to solid and the borderThickness to 0, and then set your cornerRadius to whatever you want. If the borderStyle is…
Mozilla World Record Problems
Mozilla is attempting to set a world record for downloading FireFox, good luck with that! The problem I see is that Adobe Flash Player has seen installation spikes daily that go into the 14 Million to 25 Million per day range. We report averages on all our player stats but never the spikes in traffic. It makes me think that we should be much more open about our download statistics regarding Flash Player.
Maybe we should just just submit Adobe Flash Player installs for the World Record and resubmit it as spikes occur.
Although even this gets sticky. If they count Mozilla FireFox 3 downloads according to file size, each download is 12MB average (MAC/WIN/LIN) where Flash Player is far smaller. It gets even worse when you think about auto-update a download, I am sure the OS teams at Microsoft Update see lots of issues.
Too fun!
Ted ![]()
The Adobe walled garden of knowledge
As an ecosystem we do not share knowledge very well and over time this has essentially created a very large walled garden. If you are in-the-know regarding the ecosystem or sub-segment of it, you can see all the value clearly and know where and how to get what you need to succeed. If you are outside the wall (new to Adobe tools and technologies), you see a very large intimidating wall that looks proprietary at first glance.

I don’t think anyone in Adobe had a vision of building a large wall that looks proprietary but alas here is this wall and behind it is an ocean of knowledge on how to make great experiences. Actually we have spent a great deal of effort to tear down the wall around our runtimes and core technologies with Adobe Labs, Open Source Flex, Blaze DS, Bugs.adobe.com, Open Screen Project, and Tamarin but we still have a vast quantity of knowledge in the community that is not shared.
I believe that the root cause is actually that a majority of our output is compiled and thus the source code and context remains hidden from view. View Source in the browser really enabled anyone to learn HTML/JS and this “forced sharing” makes it feel much more open. SWF on the contrary is a dark magic and how it works and how to make it do amazing things is not shared automatically. It SEEMS closed and proprietary because the source code is not present and thus the knowledge and context behind great projects are by default locked into a vault. On one hand it is really great that these formats are compiled but on the other we must do extra work to share knowledge. I believe that the “lack of sharing” is the subtle gravity that is holding back our ecosystem and that if Adobe made it easier to share knowledge we would move dramatically forward, actually violently forward.
There are some large projects underway at Adobe, “ION” and “Hyperdrive”, to tear down these walls and force knowledge into the open. I am looking forward to working on them with you and helping the community share knowledge more openly, more easily. I also want to make sure that anyone sharing knowledge gets full credit for their contribution and that value flows towards those that share in the community.
Back to tearing down this wall…
Details coming soon!
Ted ![]()
Displaying RadioButton controls using the Repeater in Flex (redux)
package comps { import flash.events.Event; import mx.containers.ApplicationControlBar; import mx.containers.Canvas; import mx.containers.Form; import mx.containers.FormItem; import mx.containers.HBox; import mx.controls.Alert; …
Displaying CheckBox controls using the Repeater in Flex
import mx.controls.Alert;
import mx.controls.CheckBox;
private function button_click(evt:Event):void {
var selArr:Array = [];
var idx:int;
var len:…
Changing roles within Adobe
On May 1 I passed my 2 year mark at Adobe and I took some time off to think very deeply about what I wanted to focus on moving forward. The thing is that I am very passionate about helping developers succeed and have found myself selecting projects related to training (Yahoo & Google) and events (Adobe MAX, Adobe Engage, 360Flex, Etc). Effective this week I will be migrating from Technical Evangelist to focus on scaling Adobe’s events and training in the Platform Business Unit. The change is a great opportunity for me personally and I really believe that we can grow the developer ecosystem/market dramatically with some key changes to our event and training strategy.

The thing is that I will never stop evangelizing; I was passionate before I joined Adobe and I remain so as I change roles within. I will keep on blogging too and with all this “Thermo” and Flex 4 stuff coming I have an endless supply of material to cover.
More to come!
Ted ![]()
Dell.com on Flex 3
Looks like Dell has been working with Flex 3. These widgets are confirmed Flex 3.
http://www.dell.com/content/products/category.aspx/desktops?c=us&cs=19&l=en&s=dhs
http://www.dell.com/content/products/category.aspx/notebooks?c=us&cs=19&l=en&s=dhs
Go Flex!
Ted ![]()



















Recent Comments