Looking for routine to expand bitmap
Bob Calbridge
bobc at attctc.Dallas.TX.US
Tue Aug 8 04:27:31 AEST 1989
Novice that I am I have two unrelated problems to solve. The first involves
expanding a bitmap. For example, I have an N x M bitmap that I need to
expand by A to get a resulting AN x AM bitmap. The vertical I can handle once
I get the horizontal expansion. By way of example if I have an 8 X 14 bit
matrix and the first byte is 01101011 and I need to have it expanded 3 times
so that the resulting three bytes are 00011111,10001110,00111111, where each
zero is replaced by three zeros and ditto for the ones.
Is there a general algorithm for handling this type of expansion?
The second problem is probably simpler. I have pretty much determined that
Turbo C stores integers with the least significant byte first. One file
structure that I'm accessing does it most significant byte first. I've used
a macro to get around the problem of printing out the value of this integer
but was wondering for the sake of manipulating the value if there is a standard
structure or "typedef" that can be used instead.
Thanks beaucoup,
Bob
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
= I know it's petty.......... =
- But I have to justify my salary! -
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
More information about the Comp.lang.c
mailing list