Posts Tagged bitmapdata

When getSize() Lies

Tags: , , , , , , , , , , ,

flash.sampler.getSize() is a handy tool for figuring out how much memory a class instance uses. However, it is often flat-out wrong. Today’s article tries it out on a variety of classes to find out which ones it works on and which ones it doesn’t.

Read the rest of this article »

4 Comments

Saving Memory with BitmapData Tricks

Tags: , , ,

Last week’s article showed a variety of tricks for saving memory with ByteArray. Today’s article explores some tricks to use with BitmapData to save even more memory.

Read the rest of this article »

2 Comments

Easily Create Power-of-Two Textures

Tags: , ,

In almost all circumstances, Stage3D requires you to provide textures with power-of-two dimensions. This is often inconvenient as most images are not already sized that way. Today’s article provides a simple class to easily build a texture with power-of-two dimensions. An example app is also provided.

Read the rest of this article »

6 Comments

From DisplayObject to Stage3D Texture

Tags: , ,

Flash makes it pretty easy to use any DisplayObject as a Stage3D texture. This is a great feature since you can use powerful, traditional classes like MovieClip, Sprite, TextField, and Shape to build a texture—often with vector graphics—and then use Stage3D‘s GPU hardware acceleration to render them with maximum performance. But this path is fraught with subtle problems, any one of which could result in poor rendering quality that’s quite hard to debug. Today’s article takes you through the process step by step to make sure you end up with great results.

Read the rest of this article »

1 Comment

Get Control Over [Embed]

Tags: , ,

The [Embed] metadata tag has been in AS3 since the beginning, but few know how to use it fully. Today’s article shows how you can go beyond the standard usage to maximize the usefulness of [Embed]. Read on for some useful tricks you may not know about and take another step toward mastering AS3.

Read the rest of this article »

9 Comments

Flash vs. HTML5: Bitmap Rotation and Scaling

Tags: , , , , , ,

Normal bitmaps can be boring, so many games spice them up by rotating and scaling them for various purposes. Rotated characters can follow the curve of a 2D terrain in a game like Dragon, Fly!. Mario himself can scale up to huge size in New Super Mario Bros.. So today we continue the HTML5 vs. JavaScript series by testing the performance of rotating and scaling bitmaps to better compare the performance across Windows, Mac, iOS, and Android. Will Flash maintain its lead? Read on to find out.

Read the rest of this article »

5 Comments

Flash vs. HTML5: Bitmap Drawing Speed

Tags: , , , , ,

HTML5 is all the rage and a lot of Flash developers are either curious about it or have actually made the switch. But how does its performance stack up against Flash? That is a very complicated question, so we’ll begin today with just a simple test of the speed at which a lot of bitmaps can be drawn to the screen. Who will win? Read on to find out.

Read the rest of this article »

26 Comments

PNG Compression Followup

Tags: , , , , , , , , , ,

Does the type of image matter when you’re compressing it to PNG? Does it affect performance? Size? This week’s article looks into these questions to find out how each of the PNG compressors performs on three different types of images: an icon, a photo, and random noise.

Read the rest of this article »

8 Comments

PNG Compressor Roundup

Tags: , , , , , , ,

Flash Player has had built-in PNG compression since version 11.3. But how does it fare against all of the other PNG compressors out there? Does it compress faster? Does it produce smaller file sizes? Today’s article explores your options when it comes to compressing PNG files so you can get the fastest or smallest PNG possible.

Read the rest of this article »

8 Comments

Image Loading Performance

Tags: , , , , , ,

Which image format is fastest to load? That was perhaps the most relevant question in last week’s article, so it’s time to explore it more deeply. Today’s article examines differences between different types of PNG, JPEG, and JPEG-XR files to answer questions like “does the JPEG quality setting matter?” and “is indexed PNG faster than full (ARGB) PNG?” Read on for the test and all the details.

Read the rest of this article »

3 Comments