Btimap scaling

Does anyone know of some code that does 1-bit per pixel bitmap scaling (i.e.
zooming in to 2x, 3x, nX)? We are developing code for this but the code
must do an enormous amount of work which is taking quite awhile each time
the rectangle is refreshed. Any advice?

Tom Fitzgerald, SEA, Inc.

Previously, Tom Fitzgerald wrote in qdn.public.qnx4.photon:

Does anyone know of some code that does 1-bit per pixel bitmap scaling (i.e.
zooming in to 2x, 3x, nX)? We are developing code for this but the code
must do an enormous amount of work which is taking quite awhile each time
the rectangle is refreshed. Any advice?

Hmmm, an interesting puzzle. I’ve never done anything like this.
In the vertical you should just need to duplicate lines. For
the horizontal you could create some pre-computed tables. If
n doesn’t get to high you could do it all this way. If you can
restrict n > 8 to multiples of 8, or at least multiples of 2
there are some obvious optomizations.


Mitchell Schoenbrun --------- maschoen@pobox.com

Previously, Mitchell Schoenbrun wrote in qdn.public.qnx4.photon:

Previously, Tom Fitzgerald wrote in qdn.public.qnx4.photon:

Does anyone know of some code that does 1-bit per pixel bitmap scaling (i.e.
zooming in to 2x, 3x, nX)? We are developing code for this but the code
must do an enormous amount of work which is taking quite awhile each time
the rectangle is refreshed. Any advice?

Hmmm, an interesting puzzle. I’ve never done anything like this.
In the vertical you should just need to duplicate lines. For
the horizontal you could create some pre-computed tables. If
n doesn’t get to high you could do it all this way. If you can
restrict n > 8 to multiples of 8, or at least multiples of 2
there are some obvious optomizations.


Mitchell Schoenbrun --------- > maschoen@pobox.com

There was a package called PNM that contains a large number of image conversion and manipulation utilities. The source is available, but I’m not sure under what license. PNM may have already addressed this issue.

HTH,

  • Pete