• 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: Composing a darker image
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Composing a darker image


  • Subject: Re: Composing a darker image
  • From: Julien Guimont <email@hidden>
  • Date: Fri, 22 Aug 2003 13:38:37 -0300

>Message: 8
>Date: Fri, 22 Aug 2003 16:43:31 +0200
>Subject: Composing a darker image
>From: Tito Ciuro <email@hidden>
>To: email@hidden
>
>Hello,
>
>I need to draw a darker image of a given TIFF-based image. The lighter
>version was easy:
>
>[image compositeToPoint: NSMakePoint(iconStatesRect.origin.x,
>iconStatesRect.origin.y)
> operation: NSCompositeSourceOver
> fraction: 0.5];
>
>A fraction of 1.0 represents the original picture, but I need to darken
>the image a bit, just the way an icon reacts to a click on a toolbar,
>for example. How can I do this?
>
>Thanks,
>
>-- Tito
>
Hello,

It is fairly easy to do by choosing the right compositing operation. You can use the composite darker and composite lighter if you want (refer to NSImage documentation for informations on operations. You can also download the Composite Lab sample form Apple dev site to get an idea use the result composite operation).

Have a nice day!

Julien Guimont
email@hidden
www.juggysoft.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: NSColorPicker question
  • Next by Date: Re: Unicode and NSTextView
  • Previous by thread: Re: Composing a darker image
  • Next by thread: Search icon
  • Index(es):
    • Date
    • Thread