Posted by admin on 16th March 2009
I just realized, I posted on a few areas but I didn’t introduce myself yet. Yes, computer scientists are human, they forget like everybody else.
My name is Kun Janos Levente, born in 1981 jul 08, living in Cluj Napoca, Romania, Europe.
Here is the link to my homepage and to my Curriculum Vitae, you can take a look at my latest work(that I’m allowed to publish of course) also you can see a few pictures of me on my Hi5 page.
Of course, nothing is updated, I’m just to busy working on great stuff in the office, sometimes at home too.
Posted in <who I am> | No Comments »
Posted by admin on 16th March 2009
I’m just back from Adobe Flex Camp Timisoara organized by Adobe Romania http://myadobe.ro/2009/02/19/flex-camp-timisoara-its-a-go/
I went to Timisoara (from Cluj Napoca, 350 km) by train (with Anca(Flash) and Bianca(Flash/Flex) my coworkers, Andrei(Bainca’s husband) and Amalia(my girlfriend)), didn’t sleep for about 48 hours at all, but it all worth it. The evangelists from Adobe Romania(Mihai Corlan, Miti Pricope and Cornel Creanga) made a really cool presentation, all the stuff they were speaking about I already know from blogs and the adobe labs page http://labs.adobe.com/
I asked the adobe people about bugs (see my post Flex Bugs) and what’s the reason they are not looking at community raised bugs on their Jira. They sad, they are looking, but there are so many community raised bugs, that they can’t take a look at every of them and most of the time they can’t reproduce it. They also sad, the bugs are prioritized and they are looking first at the bugs that have the bigger impact. We can increase community bugs priority by voting them.
Now that Timisoara Flex Camp is over, I just can’t wait Adobe to come in Cluj Napoca too.


Posted in <Flex> | No Comments »
Posted by admin on 9th March 2009
Flash/Flex/AIR produces a poor quality(pixelated) image when you load a larger image and try to re size it in the player to a much smaller size.
I searched the web and found this post http://www.cafesilencio.net/blog/bitmapdata-resize-quality-in-flex-and-air, tried the code but I didn’t see any improvements on the image quality.
It seams that Flash player doesn’t use a bilinear/bicubic interpolation algorithm to resize images, probably that’s why the produced image is so bad.
I came up with a solution, it seams that if you first apply a Blur effect on the image, then resize it, the produced image will appear much nicer. Of course the amount of Blur has to be calculated, otherwise we will end up with a poor quality image…again.
Check out the image before/after my solution, also you can try out the solution here
(don’t forget to check the “Apply Blur” check box to see my re size solution)
Here is the code for resize images using blur.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
creationComplete="applyEffects()">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.core.UIComponent;
[Bindable] private var blurQualityDP:ArrayCollection = new ArrayCollection([{label: 'Low', value: BitmapFilterQuality.LOW},
{label: 'Medium', value: BitmapFilterQuality.MEDIUM},
{label: 'High', value: BitmapFilterQuality.HIGH}
]);
public static function getUIComponentBitmapData( target:UIComponent ):BitmapData {
var bd:BitmapData = new BitmapData( target.width, target.height, true, 0 );
var m:Matrix = new Matrix();
bd.draw( target, m, null, null, null, true );
return bd;
}
private function applyEffects():void {
var w:int = widthSlider.value;
var ratio:Number = w / originalImage.width;
var h:int = originalImage.height * ratio;
if (applyBlur.selected){
var blurXValue:Number = Math.max(1, originalImage.width / w) * 1.25;
var blurYValue:Number = Math.max(1, originalImage.height / h) * 1.25;
var blurFilter:BlurFilter = new BlurFilter(blurXValue, blurYValue, int(blurQuality.selectedItem.value));
originalImage.filters = [blurFilter];
} else {
originalImage.filters = [];
}
var bd:BitmapData = getUIComponentBitmapData(originalImage);
var rbd:BitmapData = resizeImageBD(bd, w, h);
img1.source = new Bitmap(rbd, PixelSnapping.AUTO, true);
}
public static function resizeImageBD( bitmapData:BitmapData, width:Number, height:Number ):BitmapData {
var newBitmapData:BitmapData = new BitmapData( width, height, true, 0x000000 );
var matrix:Matrix = new Matrix();
matrix.identity();
matrix.createBox( width / bitmapData.width, height / bitmapData.height );
newBitmapData.draw( bitmapData, matrix, null, null, null, true );
return newBitmapData;
}
]]>
</mx:Script>
<mx:VBox>
<mx:HBox>
<mx:Label text="Image Width" />
<mx:HSlider id="widthSlider"
value="300" minimum="0" maximum="1600"
width="800"
change="applyEffects()" liveDragging="true"
snapInterval="5"
dataTipPrecision="0"/>
<mx:CheckBox id="applyBlur" label="Apply Blur" change="applyEffects()"/>
<mx:ComboBox id="blurQuality" dataProvider="{blurQualityDP}" change="applyEffects()"/>
</mx:HBox>
<mx:Label text="Image Width: {widthSlider.value}" />
<mx:Canvas>
<mx:Image id="originalImage" source="@Embed(source='test7.jpg')"
x="100" y="100"/>
<mx:Image id="img1"
/>
</mx:Canvas>
</mx:VBox>
</mx:Application>
Posted in <Flex> | 2 Comments »