Skip navigation.

Web Applications Blog

Posts tagged with "Opera Platform"

Optimizing PNG Graphics for Device

, , , ...

One of the most recent image compression formats is PNG. The advanced features of PNG, such as high compression and 32-bit support makes it the format of choice for web applications. Opera supports PNG, both on desktop and device; we use this format for most of our graphics.

There are two things you should do to your graphics, when preparing them for device. The first is color reduction, the second is re-compressing. First color reduction.

Color reduction

Why would you want to reduce the amount of colors used? We want the maximum number of colors, right? Yeah! Unfortunately, most mobile devices do not support millions of colors; many of them support only a percentage of that. The key to making sure your images look good on device is reducing color depth, using dithering techniques. Corel’s Paint Shop Pro is the only graphics application I have tested which has a special “reduce to thousands-of-colors” feature.

If you don’t own a copy, you will have to posterize your images to the color depth of the target device. Then convert this image to indexed colors with an EXACT palette. Finally go back to your original 32 bits image and convert it to indexed colors using the PREVIOUS palette and the most appropriate dithering.

The important step is the dithering. Without that, on device, your images would look exactly as the posterized version.

Note that you might have to slice the image and repeat the process to obtain an EXACT palette.

The image might not look as nice on desktop as it used to, but it should at least look the same on desktop as on device. On to part two!

Image re-compression

Isn’t PNG compressed already? Of course it is, but don’t you think we can do better? In most cases we can. Most image editors add metadata in one form or another to PNG files. In most cases this is not needed, and chopping it away can save a lot of space. In one project my final zip file went from 300kb to measly 50kb by using these techniques.

To business. You might know about the PNG compressor "PNG Crush". It was the first I ever heard about, but it seems there are some others out there as well. The most famous are OptiPNG and PNGOut.

How do they compare? They're roughly the same. So which one you use is not important; the important thing is that you actually use one of these. Therefore; accessibility. Neil Turner has a very good article on adding PNG Crush to the right-click menu of PNG files (for Windows). No need to copy his blog post, go read it!

The problem with PNG Crush is that it can't replace the current file, meaning you will have to rename the result when you're done. That is why I prefer "PNGOut" instead, which can optimize-in place.

As a final mention for you Linux users, here is what our Virtuelvis uses:

(this is using first pngcrush, and then optipng)
Compress every png into directory 'out'
$ pngcrush -rem alla -brute -fix -d out *.png
recompress them
$ cd out 
$ optipng -zc1-9 -zm1-9 -zs0-3 -f0-5 *.png 
$ mv -f *.png ../

(mv -f can be replaced with your favorite windows file moving flavor)

After this optimizing session your PNG images should look better and be leaner than ever before! :up:

Grazr in Opera Platform

,

Russell Beattie recently blogged suggesting that Grazr could be a neat mobile app

Well Russ, check it out :smile:



You can download a working copy here:


You will need to download either the Opera Platform browser or Application Player for series 60 from our download page to run the app.

It's a little slow on device and by no means complete, but I have not made any optimisations yet, I just spent an hour making it run. The details and optimisations will be the subject of a future posting.

Enjoy!

A Short Story about the Long Tail

, ,

Ajit Jaokar, one of the leading Mobile Web 2.0 pundits and authors, recently visited Opera to learn more about our efforts with Opera Platform and Mobile AJAX. It was a great day for both sides and we were excited to see his blog post describing how mobile AJAX (and Opera Platform) will help target the Long Tail.

The Long Tail is a useful image that shows how niche information rules the Web. While some content - like stock quotes, news headlines and sports scores - appeals to a majority of Internet users, much more of the Web's content is targeted to smaller groups. In Ajit's post, this could be lawn bowling fanatics. It could also be magicians. Or rabbits in hats.

The beauty of the Web is that tailored content for these groups exists. The beauty of Web 2.0 is that technologies like AJAX make it possible to connect this content and merge it with other services to create rich media applications where the imagination of the designer - and not the availability of content - is the limit.

Extending this capability to mobile phones fundamentally changes the way people interact with Web content. Mobile AJAX frameworks like Opera Platform make it easy to develop mobile applications or even tweak existing Web applications for mobile devices - without coding separate applications for each phone OS. Is that cool or what?

Opera is hard at work on a collaboration with FAST and Telenor that will bring location-based Web services and applications to mobile phones. Imagine entering your destination into a mass transit server. Since the app knows your location, it can tell you not only that the bus stop is two blocks up, but that the bus you want arrives in 20 seconds. Now your mobile might really mean it when it says sprint.

This is awesome stuff and we're curious - what are the mobile apps you'd like to see?

Welcome to Web Applications

, ,

Here at Opera we're most famous for our Web browser. In fact, that's all we do so we better be famous for it. We've had one out in the market for more than a decade. But now that browser has evolved. Instead of being an application to display static Web content, the browser is now a platform for applications.

Our first step in realizing this new world was taken with the launch of Opera Platform, the first mobile AJAX framework. Then we turned our attention to the desktop browser. In Opera 9 Technology Preview 2, we added support for Opera Widgets. Opera Widgets extend and expand the browser's functionality in dramatic ways.

Opera Platform and Opera Widgets are just a sample, a taste of what's to come. We've had our heads down in code and now its time to share our work with the outside world. This blog is the door. Welcome and enjoy.