Register
Site Login
Site Search
Forums
Advertisement
Welcome to PocketMatrix. PocketMatrix is dedicated to providing the best online community for mobile device developers and enthusiests. What's new?

The secrets of PIE/VGA rendering explored!


The secrets of PIE/VGA rendering explored!

Postby Menneisyys » Apr 22, 2005 @ 5:19pm

A lot of people have been discussing the problem of pixel doubling in Pocket Internet Explorer (PIE) on current VGA devices in the default SE VGA mode (that is, not using a tool like ozVGA or SE_VGA - please read, for example, mr_Ray's explanation of the meaning of the different VGA modes at http://www.firstloox.org//forums/showthread.php?t=3052 ). The problem is a very interesting one; therefore, I've decided to make some experiments.

I've captured several screenshots of text on screen in several resolutions to see how the image stretching / double pixeling algorithm works in PIE. I'd say it was certainly worth the effort - now, I know a lot more about how PIE works (and this info has never been published before either)!

I've made sure the character set/size that the original images use don't really span two adjacent rows/columns. This way, both the lack and the doubling of a particular pixel column/row can easily be spotted. As is with the resolution, of course. (Incidentally, I've used similar, textual stuff in my image viewer roundup at http://menneisyys.freeweb.hu/PICVIEWERS to be absolutely sure the given image viewer is capable of rendering an image in full VGA resolution, and not with just pixel doubling. With a "real-life" photo of anything "real", and not a screenshot of, say, fine-printed text, flowcharts or other machine-generated stuff, checking the effective resolution would have been much harder.)

These experiments were pretty useful in that they clearly show the problems related to using the default SE mode for, say, browsing images containing text, hand-drawings, flowcharts and the like. The stretching of PIE in SE VGA applies to medium-sized images (exact sizes/image size categories are to be mentioned below) can really make the readibility of the given image horrible. Then, simply switching to native VGA mode and/or the Desktop view will cure the problem.

The SE-mode algorithm is pretty logical: with small images that, when pixel-doubled, will still fit in the available (horizontal) screen estate, it uses pixel doubling, while with images that are (horizontally) larger than half of the (horizontal) available screen estate for displaying images, aren't - they're "only" streched, which may result in unwanted, aesthetically unpleasing results.

This distinction, however, only works in Default/One Column view; in Desktop view, pixel-doubling is always used, no matter what the original sizes are.

Incidentally, these three view modes are the view modes available in PIE shipped with WM2003SE devices. The first two tries to "crunch" everything to the available horizontal screen estate; the third doesn't. This makes the last mode impossible to use in most cases. Images that aren't in a vertical frame-table cell are always crunched successfully, but tables that have too many columns are only with varying success - in my article on CHM readers at http://menneisyys.freeweb.hu/chm , I've shown the horizontal scrolling problems caused by "wide tables". That's another problem of PIE in SE and another reason for switching entirely to native VGA mode when using PIE (or, for that matter, forgetting PIE entirely and switching to Netfront in forced/native VGA mode.)

So, this is how the image rendering algorithm works (only for the Default/One Column view and, again, only in the default SE VGA mode, not in true VGA):

- small images: when it encounters images that are thinner than half of the available screen area for HTML/image rendering (that is, in Portrait mode, thinner than about 210-220 pixels and, in Landscape mode, about 290-300 pixels), they are always pixel doubled. This means the real resolution of these images is QVGA.

- medium-sized images: images that are wider than the above-mentioned horizontal sizes but are still thinner than the real screen estate (two times the sizes cited above) are streched to the full available screen estate. This, of course, can result in aesthetically really unpleasing images, especially with images containing text. (Check out the 400*400 test image below, in Portrait mode - it's streched a bit, about 10%; this is why some, once in about every ten, of its vertical and horizontal pixel rows are doubled. This effect is especially visible in some of the screenshots below.) Now, as opposed to the first case, no pixel doubling takes place.

- large images: images wider than the available horizontal screen estate are resized to fit in there. This is visible in the shots below too. An example of this is the 450*450 image in Portrait, SE. As the available screen estate for images in Portrait mode is some 440 pixels, PIE "crunched" the image by dropping about one row/column in every 45. This is why some original columns are simply missing, and some letters are, therefore, next to unreadable.

In native VGA (up to now, I've only discussed the default SE mode), on the other hand, the situation is entirely different. No pixel doubling takes place in any (Desktop vs. the other two) mode and images that are wider than half of the screen aren't streched either. The latter means medium-sized images aren't resized to fill in the entire available horizontal screen estate. Large images are indeed crunched, but only if you use the One column/Default view, and not in Desktop mode.

And, as the last question, what happens if a third-party application (for example, a CHM viewer - all CHM viewers except for uBook) uses the PIE HTML renderer to render HTML with inline images? Images will always be pixel doubled in SE, no matter their size. Therefore, you will want to resort to sticking to native VGA mode for browsing CHM files having some important inline images - for example, technical stuff, help files etc.

Bottom line: now, you know when to switch to native VGA mode to avoid the controversial effects of, say, image stretching and what happens to images of different width.


Actual screenshots:

The test images can be found at http://menneisyys.freeweb.hu/PIErescheck .

Some screenshots in Portrait mode on a VGA device (horizontal screen estate is about 440 pixels in SE and about 460 pixels in native VGA):

Default/One Column view, SE:

Image

Image

Image

As can be clearly seen, the first two image with 100 and 200 pixels are thinner than half of the available horizontal screen estate and are, therefore, pixel doubled. The third and the fourth image, which are middle-sized, are streched to occupy the available 440 pixels. The fifth image, which is 450 pixels wide, already has some missing pixel rows/columns, which certainly shows it has been crunched. And, the same is true of all the images of higher resolution.


Desktop view, SE:

Image

Image

Nothing to be said here: all images are pixel doubled; no streching/crunching takes place.


Default/One Column view, native VGA mode:

Image

Image

Image

There is no pixel doubling for small images. No stretching for medium-sized images either, unlike the case with SE. The 450x450 image, because the available horizontal screen estate is a bit more than 450 pixels (the scrollbar and the white borders are thinner than in SE) isn't crunched either, unlike the case with SE. Larger images are, however, crunched, as you can expect from the Default/One Column view mode.

Desktop view, native VGA mode:

Image

Image

Image

Nothing interesting in here. The difference between the previous (native VGA, Default/One Column view, Portrait) mode is that it doesn't crunch images into the available horiz. screen estate.

Finally, some screenshots in Landscape mode (horizontal screen estate is about 605 pixels in SE and about 620 pixels in native VGA). The point in these tests (as opposed to Portrait tests) was to find out that PIE indeed dynamically changes between the two SE algorithms, depending on the actual orientation. That is, the images are pixel-doubled/streched according to the current (landscape) horizontal screen estate and not to the portrait screen estate.


Default/One Column view, SE:

Image

Image

Image

Image

Of interest are the 300x300 and the 400x400 images (both on the second shot). The image with the width of 300 pixels are pixel doubled because the current (landscape) screen estate is a bit above 600 pixels. The 400 image is streched. Incidentally, the width of the 600x600 image is so close to the available (landscape) screen estate that almost no effect of stretching is visible. (Only very few pixel lines are doubled, if any.)

Desktop Column view, SE:

Image

Nothing new in here - everything is pixel-doubled.
Last edited by Menneisyys on Apr 23, 2005 @ 2:40pm, edited 2 times in total.
Menneisyys
pm Member
 
Posts: 207
Joined: Dec 19, 2004 @ 5:38pm


Postby Chris Edwards » Apr 22, 2005 @ 6:41pm

Hey Menneisyys, I made this news for you. It was an interesting read--thanks for posting.
Chris Edwards
Founder
PocketMatrix.com
User avatar
Chris Edwards
Site Co-Founder
 
Posts: 4048
Joined: Jan 24, 2001 @ 7:14pm
Location: Vancouver, BC


Postby refractor » Apr 22, 2005 @ 8:00pm

Why not use a lossless format like PNG to display your findings? The JPEGs make a horrible mess of things like text.
User avatar
refractor
pm Insider
 
Posts: 2304
Joined: Feb 5, 2002 @ 1:12pm
Location: Luxembourg


Postby Menneisyys » Apr 22, 2005 @ 8:29pm

refractor wrote:Why not use a lossless format like PNG to display your findings? The JPEGs make a horrible mess of things like text.


Yes, you're right - I realized that I had saved all my stuff into JPEG's instead of GIF's/PNG's too late. I'll swap the images to better-quality ones.
Menneisyys
pm Member
 
Posts: 207
Joined: Dec 19, 2004 @ 5:38pm


Postby Menneisyys » Apr 22, 2005 @ 8:30pm

Chris Edwards wrote:Hey Menneisyys, I made this news for you. It was an interesting read--thanks for posting.


Thanks :)
Menneisyys
pm Member
 
Posts: 207
Joined: Dec 19, 2004 @ 5:38pm


Postby Chris Edwards » Apr 22, 2005 @ 9:52pm

I'll have to reset your post as news when you edit the images (when you edit it, it'll go back to a normal post). So I'll keep an eye out. Just thought I'd warn you.
Chris Edwards
Founder
PocketMatrix.com
User avatar
Chris Edwards
Site Co-Founder
 
Posts: 4048
Joined: Jan 24, 2001 @ 7:14pm
Location: Vancouver, BC


Postby Menneisyys » Apr 23, 2005 @ 2:28pm

Chris Edwards wrote:I'll have to reset your post as news when you edit the images (when you edit it, it'll go back to a normal post). So I'll keep an eye out. Just thought I'd warn you.


Thanks; revised revision uploaded.
Menneisyys
pm Member
 
Posts: 207
Joined: Dec 19, 2004 @ 5:38pm


Postby inteks » Apr 24, 2005 @ 5:32pm

hi,
is it possible to use the wm2003 version of pie with wm2003se ???
is the wm2003 version without pixeldoubling? is it possible to apply the vga hack to the wm2003 pie version and use it on wm2003se ???

does anyone has a wm2003 and a wm2003se pda how can check this out?

tia
inteks
inteks
pm Member
 
Posts: 4
Joined: Feb 3, 2005 @ 7:50am


Postby Menneisyys » Apr 28, 2005 @ 3:16pm

Now, some additional images. I've reduced the height of the images so that they can all be seen at once. This shows the effect of pixel doubling/stretching/compression even better. Note that I only took shots in Default view (that is, there're no Desktop view shots).

Orginal test link: http://menneisyys.freeweb.hu/PIErescheck/addon.html


SE VGA, landscape:
Image


SE VGA, portrait:
Image


Native VGA, landscape:
Image


Native VGA, portrait:
Image
Menneisyys
pm Member
 
Posts: 207
Joined: Dec 19, 2004 @ 5:38pm


Postby Menneisyys » Apr 28, 2005 @ 5:00pm

inteks wrote:hi,
is it possible to use the wm2003 version of pie with wm2003se ???
is the wm2003 version without pixeldoubling? is it possible to apply the vga hack to the wm2003 pie version and use it on wm2003se ???

does anyone has a wm2003 and a wm2003se pda how can check this out?


It's, unfortunately, impossible to copy the WM2003 version of PIE to WM2003SE because files in ROM aren't accessible.

Furthermore, all PIE plug-ins (including ftxPBrowser using the forced VGA hack) leave the standard SE PIE image rendering algorithm intact. I've made some example screenshots of this:

Latest ftxPBrowser, forced VGA:
Image

Latest ftxPBrowser without any hack:
Image

Latest MultiIE, native VGA (all the other shots are in SE!):
Image

Latest MultiIE
Image

Latest (3.0 beta2, see my review of it at, say, http://www.pocketmatrix.com/forums/view ... hp?t=20782 ) PIEPlus
Image

Incidentally, I've also made some shots of both NetFront 3.1 and 3.2, in SE, using Smartfit (which, when displaying images, works the same as Justfit). Both 3.1 and 3.2 requires the forced VGA mode hack (and, in addition, the 3.1 an additional DLL hack) to display Web content without pixel doubling. As can clearly be seen, no pixel doubling takes place (in SE):

Image
Image
Image
Image


This means you need to use native VGA and/or switch to NetFront. But, if you indeed switch to NetFront, be aware of a very nasty bug in version 3.1, which was only recently fixed, in version 3.2. See for example http://www.pocketmatrix.com/forums/view ... hp?t=21295 on it.
Menneisyys
pm Member
 
Posts: 207
Joined: Dec 19, 2004 @ 5:38pm


Postby Chris Edwards » Apr 28, 2005 @ 5:15pm

Have you tried the mobile Opera browser at all?
Chris Edwards
Founder
PocketMatrix.com
User avatar
Chris Edwards
Site Co-Founder
 
Posts: 4048
Joined: Jan 24, 2001 @ 7:14pm
Location: Vancouver, BC


Postby Menneisyys » Apr 28, 2005 @ 8:19pm

Chris Edwards wrote:Have you tried the mobile Opera browser at all?


Not yet. Most of the reviews I've read were quite bad so I decided to wait for the next release.
Menneisyys
pm Member
 
Posts: 207
Joined: Dec 19, 2004 @ 5:38pm


Postby Chris Edwards » Apr 28, 2005 @ 8:24pm

I've been using it on my Smartphone, and it's much better than PIE in my opinion. It handles formatting much better for the small screen.

I haven't tried the Pocket PC version yet, although I'd imagine that they're similar.
Chris Edwards
Founder
PocketMatrix.com
User avatar
Chris Edwards
Site Co-Founder
 
Posts: 4048
Joined: Jan 24, 2001 @ 7:14pm
Location: Vancouver, BC


Postby Menneisyys » Apr 28, 2005 @ 8:51pm

Chris Edwards wrote:I've been using it on my Smartphone, and it's much better than PIE in my opinion. It handles formatting much better for the small screen.

I haven't tried the Pocket PC version yet, although I'd imagine that they're similar.


Yeah, it's a very good Smartphone browser; on the PPC, however, it's (Minimo) just a newcomer; this is why the port is (still) so buggy.
Menneisyys
pm Member
 
Posts: 207
Joined: Dec 19, 2004 @ 5:38pm


Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron