• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: UIImageView display as "multiply"?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UIImageView display as "multiply"?


  • Subject: Re: UIImageView display as "multiply"?
  • From: Bertil Holmberg <email@hidden>
  • Date: Fri, 22 Jan 2010 16:43:33 +0100

Here is a snippet that I saved for another day, perhaps it will get you going?

Regards,
Bertil

- (UIImage *)blendOverlay:(UIImage *)topImage withBaseImage:(UIImage *)baseImage toSize:(CGFloat)imageSize
{
	UIGraphicsBeginImageContext(CGSizeMake(imageSize, imageSize));
	[baseImage drawInRect:CGRectMake(0.0, 0.0, imageSize, imageSize)];
	[topImage drawInRect:CGRectMake(0.0, 0.0, imageSize, imageSize) blendMode:kCGBlendModeNormal alpha:0.5];
	UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
	UIGraphicsEndImageContext();

	return image;
}

> Okay, how would I go about doing that?
>
> On Fri, Jan 22, 2010 at 9:52 AM, Luke the Hiesterman <email@hidden>wrote:
>
>> You should perform whatever blending you need to do on the image itself to
>> create a new image which you can then just put into a UIImageView like you
>> would any other image. This way, you only have to blend once, and then it's
>> just image that can be straight drawn rather than performing a blending
>> algorithm every time your image has to draw.
>

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: UIImageView display as "multiply"?
      • From: "Eric E. Dolecki" <email@hidden>
  • Prev by Date: Re: How to avoid launching the same application multiple times?
  • Next by Date: Re: Weird exception
  • Previous by thread: Re: UIImageView display as "multiply"?
  • Next by thread: Re: UIImageView display as "multiply"?
  • Index(es):
    • Date
    • Thread