bitmap

How to copy pixels from one bitmap to another shaped like a circle ?

I am using setPixel and getPixel functions but they are using matrices which is naturally rectangle.I am trying to copy pixels shaped like circle ! update : now i am using this but i hope there is something more efficient than this one : for(int i=0;i<eHeight ; i++) for(int j=0;j<eWidth ; j++) if( Math.pow((i-eHeigh...

Graphics DrawImage is all transparent after converting to bitmap

Hi everyone. A bit of back story: I am currently trying to load a texture with OpenTK, so I am finding the next power of 2 (512,1024 etc) and creating a new bitmap with that size and drawing the original bitmap on: Bitmap bmp = new Bitmap(filename); width = bmp.Width; height = bmp.Height; int w2 = (int)PowerOf2(width); int h2 = (int)Pow...

Draw to HDC with user allocated memory

I have an windowless IViewObject object. I want to call its Draw function to render into Opengl PBO memory (alternatively OleDraw is simpler). Right now i first create an HBITMAP using CreateDIBSection (which allocates its own memory) and then copy from this into my PBO memory. However, I'd like to avoid this extra copy. I believe this...

rub image in canvas

I am using android 2.x and I have four bitmaps drawn on a canvas, now i want to replace "yahoo" image with some other image and that image's size is different than "yahoo" image. Now what i want is , i want to rub the yahoo image and replace it with the new one but in such a way that if i rub "yahoo" image then images that are laying in ...

How to zoom in and out to a bitmap without loosing resolution ?

I am trying to implement pinch zoom and it is working but when i zoom out and then zoom in again the resolution of the image(bitmap) decreases. I am aware that this is just normal behavior of my code and i want to know how to do this with right way . here is the relevant code : Matrix matrix = new Matrix() ; float scale = newDist / old...