Pasting one bitmap onto another

Pasting one bitmap onto another

Post by Ben Jess » Sun, 15 Sep 2002 02:51:02



I have a bitmap which 8 * 8 bytes ( byte encoded ).
I want to paste this bitmap into a destination bitmap at arbitary X
and Y coordinates. The coordinates supplied are in pixels ( i.e bitmap
bits ), as is the width.

So my method/funtion signature would look like

public byte[] pasteBitMap( byte[] a_bySourceBitmap, byte[]
a_byDestBitmap,
                    short a_shDestWidthInPixels,short
a_shDestHeightInPixels,
                    short a_shStartXPixelPos, byte a_shStartYPixelPos
)
{

????

Quote:}

I'm having trouble getting my head around all the >>'s and masks that
I would have to do, and I'd really appreciate an algorithm, or at
least an explanation of how I would go about solving this. Otherwise I
fear I will just convert the source and destination byte array into
single bit arrays and 'hack it' -  Not efficient and not clever!

Thanks

Ben