View Single Post
Old 24 November 2007, 08:27   #58
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,764
To get back to the topic, I made a simple bmp viewer in assembler which uses the 3x1 'screen mode'. It scales down (sorry) an 800x600 24bit image to 33%x50% and displays the image in 60 frames. The program does kill the os, and thus lacks an intuition screen (pure metal banging).

The 60 frames include scaling and drawing, but exclude reading the bmp file and memory allocation. Further more, the c2p currently draws 1280xscaled height.

It turns out the scaling/3x1 mode combination is less expensive then a high quality ham rendering engine, and yours is definitely high quality (the only way to improve it is to calculate the base palette for the whole image, maybe an idea for a super high quality mode).

Since you showed interest in the 3x1 screen for a quick and dirty mode, I thought I'd write a proper test program. If you want, I can put it in the zone, including the right include files, and AsmOne (if you don't have it), as you'll need that to do the speed test.

Another advantage of this quick and dirty stuff is that any image up to 1280x1024 fits on the screen completely. However, it's definitely not a replacement for the hq code you already have.

Have edited this reply far too many times now! One last go:

One more thing about scaling: It would be a great option. If someone doesn't want it, they don't have to use it, while if they do, it's there! The reason I'm mentioning the whole scaling thing again? Have you considered images which are way to large to fit on the screen, such as 1280x1024 jpegs, or worse, 1600x1200? For your hq mode 1280x1024 can be scaled down to 640x512 by averaging 4 pixels, that means you can shift and don't have to use divs. Also, consider the chip mem needed for 1280x1024, it's a whopping 1.2 megs! Scaled down it's only 320kb, and it fits the screen snugly! For 1600x1200 you can scale down to 33%x33%, now you do need divs, but since it can be done in one go, you have three divs for nine pixels, which seems pretty good to me. And for 1600x1200 you have to scale, as it takes up 1.9 megs, simply making it impossible to display this directly. Scaling like this also has the advantage of less ham pixels to render, so the scaling isn't much of an issue anyway!

It's these kind of features I've always wanted to see in jpeg viewers, but never found them. Just thought to let you know.

Last edited by Thorham; 26 November 2007 at 09:11. Reason: Added some text, and corrected mistakes.
Thorham is offline  
 
Page generated in 0.04687 seconds with 11 queries