Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17625

Question about enlarging a bitmap.

$
0
0

I have an eight by eight bitmap box (24 bit) with four colors, one in each quadrant.  I am trying to enlarge it to sixteen by sixteen.  I am concentrating on the blue and green sections.  The first attempt looks like this:

The second attempt is supposed to double each row and results in this:

The pixels do enlarge but the rows are one color, not blue and green.

The code is as follows:

if ((i % 12 == 0) && (i != 0))
            {

                if (wenthere == 2)
                {
                    wenthere = 0;
                    i = i - 12;

                }
                wenthere++;
            }

And the full code is here:

while (1)
    {
        count …

Viewing all articles
Browse latest Browse all 17625

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>