Welcome to PocketMatrix.com, a Mobile Devices enthusiast website. If you're a developer, be sure to check out our developer forums.
You can change your sidebar preferences in your Profile.

 Home | FAQ | Search | Memberlist | Usergroups | Profile | Log in to check your private messages | Log in | Register 
General Developer Discussion
The secrets of PIE/VGA rendering explored!

Page 1 of 1 | [ Post new topic ] [ Reply ]
PostPosted: Fri Apr 22, 2005 4:19 pm | Post subject: The secrets of PIE/VGA rendering explored!
Menneisyys
pm Member


Joined: 19 Dec 2004
Posts: 207


View user's profile Send private message



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:







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.

Reply with quote


Last edited by Menneisyys on Sat Apr 23, 2005 1:40 pm; edited 2 times in total
PostPosted: Fri Apr 22, 2005 5:41 pm | Post subject:
Chris Edwards
Site Co-Founder


Joined: 24 Jan 2001
Posts: 3826
Location: Calgary, Alberta / Waterloo, Ontario

View user's profile Send private message Send e-mail Visit poster's website

MSN Messenger AIM Address

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


_________________
case admin:
?>
Chris Edwards
Webmaster and Co-Founder
PocketMatrix.com
Reply with quote
PostPosted: Fri Apr 22, 2005 7:00 pm | Post subject:
refractor
pm Insider


Joined: 05 Feb 2002
Posts: 2312
Location: Luxembourg

View user's profile Send private message



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

Reply with quote
PostPosted: Fri Apr 22, 2005 7:29 pm | Post subject:
Menneisyys
pm Member


Joined: 19 Dec 2004
Posts: 207


View user's profile Send private message




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.

Reply with quote
PostPosted: Fri Apr 22, 2005 7:30 pm | Post subject:
Menneisyys
pm Member


Joined: 19 Dec 2004
Posts: 207


View user's profile Send private message




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



Thanks Smile

Reply with quote
PostPosted: Fri Apr 22, 2005 8:52 pm | Post subject:
Chris Edwards
Site Co-Founder


Joined: 24 Jan 2001
Posts: 3826
Location: Calgary, Alberta / Waterloo, Ontario

View user's profile Send private message Send e-mail Visit poster's website

MSN Messenger AIM Address

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.


_________________
case admin:
?>
Chris Edwards
Webmaster and Co-Founder
PocketMatrix.com
Reply with quote
PostPosted: Sat Apr 23, 2005 1:28 pm | Post subject:
Menneisyys
pm Member


Joined: 19 Dec 2004
Posts: 207


View user's profile Send private message




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.

Reply with quote
PostPosted: Sun Apr 24, 2005 4:32 pm | Post subject:
inteks
pm Member


Joined: 03 Feb 2005
Posts: 4


View user's profile Send private message



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

Reply with quote
PostPosted: Thu Apr 28, 2005 2:16 pm | Post subject:
Menneisyys
pm Member


Joined: 19 Dec 2004
Posts: 207


View user's profile Send private message



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:



SE VGA, portrait:



Native VGA, landscape:



Native VGA, portrait:


Reply with quote
PostPosted: Thu Apr 28, 2005 4:00 pm | Post subject:
Menneisyys
pm Member


Joined: 19 Dec 2004
Posts: 207


View user's profile Send private message




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:


Latest ftxPBrowser without any hack:


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


Latest MultiIE


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


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):







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/viewtopic.php?t=21295 on it.

Reply with quote
PostPosted: Thu Apr 28, 2005 4:15 pm | Post subject:
Chris Edwards
Site Co-Founder


Joined: 24 Jan 2001
Posts: 3826
Location: Calgary, Alberta / Waterloo, Ontario

View user's profile Send private message Send e-mail Visit poster's website

MSN Messenger AIM Address

Have you tried the mobile Opera browser at all?


_________________
case admin:
?>
Chris Edwards
Webmaster and Co-Founder
PocketMatrix.com
Reply with quote
PostPosted: Thu Apr 28, 2005 7:19 pm | Post subject:
Menneisyys
pm Member


Joined: 19 Dec 2004
Posts: 207


View user's profile Send private message




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.

Reply with quote
PostPosted: Thu Apr 28, 2005 7:24 pm | Post subject:
Chris Edwards
Site Co-Founder


Joined: 24 Jan 2001
Posts: 3826
Location: Calgary, Alberta / Waterloo, Ontario

View user's profile Send private message Send e-mail Visit poster's website

MSN Messenger AIM Address

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.


_________________
case admin:
?>
Chris Edwards
Webmaster and Co-Founder
PocketMatrix.com
Reply with quote
PostPosted: Thu Apr 28, 2005 7:51 pm | Post subject:
Menneisyys
pm Member


Joined: 19 Dec 2004
Posts: 207


View user's profile Send private message




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.

Reply with quote
[ Post new topic ] [ Reply ] Page 1 of 1 |
Display posts from previous:
All times are GMT
Jump to:  

 
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 vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum