• 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: making a screenshot
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: making a screenshot


  • Subject: Re: making a screenshot
  • From: Brant Sears <email@hidden>
  • Date: Tue, 20 Jan 2004 18:51:57 -0800

There are several ways. One person suggested a call to a command line app.
If you are running under Jaguar, you could also invoke an AppleScript to
take a screen shot.

Another method is to use the core graphics routine: CGDisplayBaseAddress()
to get the address of the frame buffer. Inside of CGDirectDisplay.h there
are several calls that you can use to get things like the display size, the
bit depth, etc. that you will need in order to interpret the framebuffer.

There is also a way to setup an OpenGL full screen context and call
glReadPixels() which can also get at the screen data.

Or, if you are really old fashioned, you can the QuickDraw interface (from
Carbon), you can get at the screen data by looking at the gdpMap field in a
GDevice structure which is returned by calls like GetMainDevice(). You can
do a CopyBits from this into some buffer that you own.
_______________________________________________
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: Re: Re: Using Perl in a Panther environment
  • Next by Date: Re: Q: how do you generate get/set methods?
  • Previous by thread: Re: making a screenshot
  • Next by thread: Re: making a screenshot
  • Index(es):
    • Date
    • Thread