Archive for the 'AIR' Category

Actionscript 3 vector speedups

Thursday, September 25th, 2008

Mike Chambers has posted a comparison between the performance of AS3 arrays and the new Vectors available in Flash Player 10. The results look good: he managed a 60% speedup. This is very exciting for us at CleVR, because of the potential impact it has on the Stitcher in particular. This uses massive Arrays and lots of nested loops which seem to be just the kind of thing that would benefit from this. I haven’t had a chance to do any benchmarking of my own (hard at work on CleVR Pro) but when I do I’ll post another entry.

Hiding Flex DataGrid columns using a context menu in AIR

Thursday, August 28th, 2008

A Flex/AIR project I’m working on at the moment uses a DataGrid to display a lot of data. There needs to be lots of columns, but this means that the view can be a bit cluttered. What I wanted was an easy for the user to show or hide columns as they prefer. In Cocoa on Mac OS X you can right-click (or ctrl-click) to show a context menu to do this, which seems to be a good way. I thought there may be a way of doing this in Flex, but there didn’t appear to be. It was quite simple to implement and could be useful in lots of cases, so I thought I’d share the code. I put this in a creationComplete handler.

I’ve attached it as a context menu on the DataGrid, but you could also attach it to the header or to a button. I hope it helpful to someone.

var context:NativeMenu = new NativeMenu();
for each (var col:DataGridColumn in myDataGrid.columns){
	var menuI:NativeMenuItem = new NativeMenuItem(col.headerText);
	menuI.checked = col.visible;
	menuI.data = col;
	context.addItem(menuI);
}
context.addEventListener(Event.SELECT, function(e:Event):void {
	var t:NativeMenuItem = e.target as NativeMenuItem;
	t.checked = !t.checked;
	t.data.visible = t.checked;
});
 
myDataGrid.contextMenu = context;

State change bug in Flex

Sunday, August 17th, 2008

I’ve been trying to track down the source of a bug in the Stitcher. The issue was in the welcome screen, which has states for logging-in, creating a new account etc. The problem was that whenever the login state had been active, moving to another state would throw an error, The supplied DisplayObject must be a child of the caller. After much trial and error I worked out that it was down to the ControlBar that held the login buttons. It seems that the issue is that when Flex adds a controlbar, it doesn’t actually add it as a child of the container in which you place it. This means that when you then try to remove it, it’s in the wrong place. It seems to be related to this bug, which was apparently fixed last year. I’m going to have to produce a minimal version and see if I need to submit a bug report and/or patch.

Anyway, after changing it to use an HBox it’s working. I’ve uploaded a new version of the CleVR Stitcher with that fix and a few others. You can install it from that box in the sidebar (unless you’re reading this via the feed).

CleVR Stitcher update fixes Sony support

Friday, May 23rd, 2008

The CleVR Stitcher uses EXIF tags embedded in the source images to calculate how the images should be warped before stitching. There is a hopeless lack of standardisation in these tags, so we have to use several different techniques to support photos from different camera manufacturers. Sony is the worst, as they do not provide enough information to enable us to make the calculation. This means that we have to use a different method to make an educated guess. However, a bug in the previous version of the Stitcher meant that Sony images would not stitch at all. Thanks to a bug report by user benbreeze this is now fixed. I have also fixed another bug in the self-updater. You can upgrade to the new version here.

New Stitcher, new AIR

Sunday, March 2nd, 2008

On Monday, Adobe AIR was officially launched. Of course, we’ve been using the beta version of AIR for the CleVR Stitcher for over six months now, but it’s good to see it go 1.0. This means that we’ve also released a new version of the Stitcher, which uses the latest version of AIR. You can install it below, using the shiny new installer badge. It will update or install AIR for you if needed.

New version of CleVR panoramic image Stitcher

Tuesday, January 15th, 2008

We’ve just released a new version of the CleVR Stitcher. This uses the new version of Adobe AIR, and also adds several features and fixes lots of bugs. If you download it, please do let me know what you think and if you have any problems with it.

We’re so two-point-oh: updated Stitcher. Tagging added to panoramas.

Tuesday, October 2nd, 2007

Yup, another update to CleVR. Firstly, the AIR CleVR Stitcher has been updated again. We’ve also made it the primary Stitcher now. The Java version is still available, but we recommend everyone move to the AIR one now, as it’s a lot better. This version runs on Beta 2 of AIR, just released by Adobe. If you launch it from the stitcher page and you’ve previously run the AIR Stitcher it will update your version of AIR automatically. The Stitcher has few updates from the last version, probably the most significant of which is a greatly improved uploading system. It’s a lot quicker.

Secondly, updates to CleVR.com. Following on from commenting, added at the weekend, we now have tagging. So Web 2.0! You can add tags to your panoramas, such as place names and so forth. Give it a go: you’ve find the button for it on your panorama pages if you’re logged-in.

CleVR Actionscript libraries now on RIAForge

Thursday, September 6th, 2007

I’ve put up the CleVR AS3 libraries on RIAForge, where you can download them as a zip file, or use the svn repository.

The library includes a number of classes that we developed as part of the CleVR Stitcher. They include a set of matrix algebra classes, ported from the Java JAMA library. These let you do standard matrix algebra stuff, and includes support for singular value decomposition and QR decomposition.

There’s also some graphics classes. One is a subclass of BitmapData that adds bicubic and bilinear interpolation. Another is a class for calculating the histogram of an image, with methods to do histogram stretching. This gives results similar to “Auto levels” in Photoshop, or “Enhance” in iPhoto.

You will find them here. They’re released under the Creative Commons attribution licence, which basically lets you do anything with them, so long as you give credit somewhere. A link to clevr.com would usually suffice. Let me know if you have any comments, patches, or if you’re using it.

Major update to CleVR Stitcher

Wednesday, September 5th, 2007

CleVR StitcherI’ve just pushed out an update to the CleVR Stitcher which is probably the biggest improvement yet. Loads more features, loads of bugs fixed and a much nicer interface. You will find all the details here: CleVR panoramic photo Stitcher. As always, it’s totally free. Let me know what you think.

I decided to enter it into the Adobe AIR Developer Derby. It’s hard to judge its chances, but I’d love to win that squishy stress ball. If they’re going on innovation, I’d say they’d be hard-pressed to find an AIR app that is pushing the boundaries more than this. In terms of using AIR technologies, we’re using almost all of them! We’ll wait and see…

Image enhancement with histogram stretching in Actionscript

Friday, July 27th, 2007

Yesterday’s update to the CleVR Stitcher has a number of new features. One of these is image enhancement for the finished panorama. This corrects under- or over-exposed images, and works in a similar way to “Auto levels” in Photoshop, or Enhance in iPhoto. See below for more details and a demo.
(more…)