views:

1066

answers:

2

Hi! I am trying to draw an image that has some transparent regions. I load the image using

image = [UIImage imageNamed:@"testimage.png"];

and draw it using

[image drawAtPoint:CGPointMake(0,0)];

The UIView on which I draw the image is not opaque (and it has a transparent background color).

The problem is that everything works fine on the simulator, but when I run the app on my iPhone the transparent color becomes black! Can anyone pinpoint my error?

+2  A: 

I had the same problem today with a picture of mine. I've created the picture my self in GraphicConverter.

My solution was to add an alpha channel to the picture. I did this with GraphicConverter using the command found in Picture => Alpha Channel => Create Alpha Channel with transparency . It could be that the command has a different name for you as I use the app with a german language setting.

Hope this helps.

Chris
A: 

I solved my problem by loading it into colorsync and then saving it.

ragnarius