How to screencapture CONTENTS of a window, without title bar?

I've been trying to find a solution to doing a screen capture but NOT the window title bar, just the CONTENTS of the window. For example, in Photoshop, I only want the image IN the window, not the bits with the 3 coloured blobs in the upper left of all windows and the document title


All the references I've foiund talk about capturing the wndow, but no-one talks about the contents of the window.


Am I trying to invent a wheel here?


Any advice gratefully received.

Posted on May 18, 2014 4:24 PM

Reply
28 replies

May 19, 2014 7:17 AM in response to LD150

Peter,


Thanks for taking the time to demo. I appreciate it. Yes, I can use crosshairs, and that would work (once I practice with accuracy using crosshairs), but I would prefer a method which is pixel-accurate with one click. I feel this is in keeping with Mac quality workflow. This is what my original question was about.


Again, thnaks for replying.

Apr 23, 2015 6:57 PM in response to djfilms99

Hi djfilms99,


I have a similar issue, and I share your frustration. The crosshairs recommendation you keep getting is workable, but tedious and error-prone. You need something easily repeatable.


I find that when something isn't easily repeatable in the UI, that's when Mac's being unix under the hood really shines. If you're comfortable on the command line (the Terminal app) and perhaps with a little scripting, a workaround for something like this is doable.


You need a command line utility called "convert". It's part of the imagemagick suite of tools (imagemagick.org). If your Mac didn't ship with it installed, there is a binary download on the imagemagick site. A little set up work, but if you need to do bulk work on images, totally worth it.


In my case I needed to capture images that I knew were always 320x480. The shift-command-4 spacebar capture of one of these windows came out 432x614:


$ file screengrab.png

screengrab.png: PNG image data, 432 x 614, 8-bit/color RGBA, non-interlaced


There's more extra than title bar there! There's also shadows all the way around. I figured out that the padding is 56 on left and right, 54 on top (including the title bar), and 80 pixels below. Armed with this, the convert command looks like this:


$ convert screengrab.png -crop 320x480+56+54 cropped.png

$ file cropped.png

cropped.png: PNG image data, 320 x 480, 8-bit/color RGBA, non-interlaced


Voila! If you know your image dimensions you want to trim it to (sounds like you will since you're dealing with video), just plug those dimensions in where I've got "320x480" and whatever your filenames are, and it should work.


Granted, it's quite a bit more work than just clicking on something once, but it's a LOT less work than painstakingly mouse dragging to the pixel over and over and over again. I hope this helps you!

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to screencapture CONTENTS of a window, without title bar?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.