Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Raster graphics

Name: Anonymous 2010-09-29 20:25

How are raster graphics renderers usually organized?

I'm making a simple bitmap (as in, the file format) renderer in C++ as a learning project. I've got a BitmapReader class which takes in a FILE handle to a .bmp and provides basic services such as retrieving the pixel at row X and column Y, retrieving all of the pixels of row X, and so on.

Right now the renderer just runs a loop that calls getPixel(row, column) over and over until the image is complete, but of course this is very slow.

Row by row would be faster, and it would work in most cases, but what about cases where it wouldn't? Off the top of my head I can only think of one, which is when you're zoomed out. I assume the basic principle is to grab a block of pixels from the bitmap, average them according to some algorithm, and then display the result. In which case you'd have to go pixel by pixel rather than row by row. How is zoom-out usually implemented?

Name: Anonymous 2010-09-29 21:30

>>6
The Nintendo DS also uses nearest neighbor interpolation, even for textures. Then again, considering it uses low-res textures that might actually for the better.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List