cgimagecreatewithmask

Why does my image mask make my image black, where the mask is white?

I have a 300 x 400 px PNG-24 with alpha channel. It's about 140kb. I want to mask out some parts of that, so I created another 300 x 400 image as PNG-24 but with only black, gray and white and no alpha channel. The weird thing is: Where the mask is black, the image is just kept original. No transparency. But where the mask is white, the...

CGImageRef resize without scaling

Hi, I have a CGImageRef that is lets say 35x35. I'm using it and a mask to create another image, but the mask is 50x50. CGImageRef subImage = CGImageCreateWithImageInRect(imageRef, CGRectMake(x, y, 35, 35)); CGImageRef xMaskedImage = CGImageCreateWithMask(subImage, mask); Apparently this stretches the subImage out to be 50x50, but w...

CGImageCreateWithMask with an image as a mask

Hi I am trying to use an image (270 degrees of a circle, similar to a pacman logo, painted as Core Graphics) to create a mask. What I am doing is this 1. creating a Core Graphics path CGContextSaveGState(context); CGContextBeginPath(context); CGContextMoveToPoint(context,circleCenter.x,circleCenter.y); //CGContextSetAl...

Captured image convetred into heat, night, b&w Modes. How to save the converted image save in portrait mode in iphone?

Hi, I am begining to iphone. i am working on camera modes. like heat, night, black and white. after capturing the image it will convertd into selected mode, like heat,b&w,night, but the problem is after converting the image it shows in landscape mode. Help me ...