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.
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:
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:
Nothing to be said here: all images are pixel doubled; no streching/crunching takes place.
Default/One Column view, native VGA mode:
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:
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:
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:
Nothing new in here - everything is pixel-doubled.