• 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: Pixel level drawing in Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pixel level drawing in Cocoa


  • Subject: Re: Pixel level drawing in Cocoa
  • From: Gerard Iglesias <email@hidden>
  • Date: Wed, 11 Dec 2002 22:18:08 +0100

Did you try to use :

unsigned int bytesPerRow = (itsSize.width * 8 * 4 + 7)/8;
unsigned char * data = NSZoneMalloc([self zone], itsSize.height *
bytesPerRow);

itsContext = CGBitmapContextCreate(data, itsSize.width,
itsSize.height, 8, bytesPerRow, CGColorSpaceCreateDeviceRGB(),
kCGImageAlphaPremultipliedLast);


It builds a CoreGraphics context that you can use with CG functions

Gerard

On Wednesday, December 11, 2002, at 08:18 PM, <email@hidden>
wrote:

> Hi,
>
> What's the best APIs to use if I would like to do pixel level drawing
> in Cocoa
> but would later like to manipulate my image with Quartz functions? I'm
> considering using a NSBitmapImageRep but I'm hoping there's something
> simpler
> I've overlooked.
>
> Thanks
> ~Hua ying
> _______________________________________________
> 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.
_______________________________________________
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: can I remove header files from built-in framework?
  • Next by Date: Re: NSTableView or NSArray Troubles...
  • Previous by thread: Pixel level drawing in Cocoa
  • Next by thread: NSTableView or NSArray Troubles...
  • Index(es):
    • Date
    • Thread