Go Back   The macosxhints Forums > OS X Help Requests > System



Reply
 
Thread Tools Rate Thread Display Modes
Old 02-12-2004, 03:11 AM   #1
Twelve Motion
All Star
 
Join Date: Sep 2003
Location: Minneapolis, MN
Posts: 966
Question about screen capture

When I push Command+Shift+3 in order to capture a screen image I end up with an Adobe Acrabat pdf file named Picture 1. Is there a way I can make this be a JPEG instead?

Maybe I am going about it all wrong. Here is the situatioin. I have an SNES emulator, and I am captureing games images in order to make them screen saver pictures that cycle. Can I use PDF files to be screensaver pics and/or desktop pictures?
Twelve Motion is offline   Reply With Quote
Old 02-12-2004, 07:16 AM   #2
hayne
Site Admin
 
Join Date: Jan 2002
Location: Montreal
Posts: 32,473
If you search these forums, you will find several other threads that discuss this issue and offer suggestions.
And note that the Preview app can open PDFs and export them in other formats.
hayne is offline   Reply With Quote
Old 02-12-2004, 02:53 PM   #3
Twelve Motion
All Star
 
Join Date: Sep 2003
Location: Minneapolis, MN
Posts: 966
Thanks for the help. I didn't know this board had multiple threads. I know that preview can do that, but it's twice as much work since I need to take the picture then open it in Preview and re-save it. I'll look around for other topics.
Twelve Motion is offline   Reply With Quote
Old 02-20-2004, 03:02 PM   #4
Lankhmart
Triple-A Player
 
Join Date: May 2003
Posts: 150
With Image Events in Panther, you can use a folder action script to automatically convert any PDF screenshots that are saved to the desktop into JPEGs.

Code:
on adding folder items to this_folder after receiving these_items
	repeat with an_item in these_items
		tell application "Finder"
			set file_name to name of an_item
			set file_ext to name extension of an_item
			if file_name starts with "Picture" and file_ext is "pdf" then
				set jpeg_path to my getSafeName()
				tell me to convertToJPEG(an_item, jpeg_path)
			end if
		end tell
	end repeat
end adding folder items to

on getSafeName()
	set desk_path to (path to desktop as Unicode text)
	try
		alias (desk_path & "Picture 1.jpg")
		set i to 0
		repeat
			set i to i + 1
			set path_to_check to (desk_path & "Picture " & i & ".jpg")
			try
				alias path_to_check
			on error
				set jpeg_path to path_to_check
				exit repeat
			end try
		end repeat
	on error
		set jpeg_path to (desk_path & "Picture 1.jpg")
	end try
	return jpeg_path
end getSafeName

on convertToJPEG(pdf_file, jpeg_path)
	tell application "Image Events"
		set image_ref to open pdf_file
		save image_ref in jpeg_path as JPEG with icon
		close image_ref
		--delete pdf_file
	end tell
end convertToJPEG
Just save the above code into a compiled AppleScript file, say "pdf2jpeg.scpt," and place it into ~/Library/Scripts/Folder Action Scripts. Then control-click on your desktop, select "Attach a Folder Action..." from the contextual menu, and choose your new script in the dialog box. Now any file named "Picture <anything>.pdf" that lands on the desktop will be converted into a JPEG.

Note: if you want the script to automatically delete the original PDF, uncomment the line "--delete pdf_file" in the code above (that is, remove the "--").

Edit: made a change to the script to avoid continually overwriting "Picture 1.jpg" if the PDF deletion is turned on.

Last edited by Lankhmart; 02-21-2004 at 12:37 PM.
Lankhmart is offline   Reply With Quote
Old 08-10-2004, 07:44 PM   #5
alanwatts
Prospect
 
Join Date: Aug 2004
Posts: 3
Quote:
Originally Posted by Lankhmart
With Image Events in Panther, you can use a folder action script to automatically convert any PDF screenshots that are saved to the desktop into JPEGs.

Here's another version that lets you choose the file format to convert it to:

Code:
on adding folder items to this_folder after receiving these_items
	repeat with an_item in these_items
		tell application "Finder"
			set file_name to name of an_item
			set file_ext to name extension of an_item
			set desk_path to (this_folder as string)
			
			set pdf_size to (size of file an_item as integer)
			repeat until pdf_size > 0
				delay 1
				set pdf_size to (size of file an_item as integer)
			end repeat
			
			if file_name starts with "Picture" and file_ext is "PDF" then
				set format_return to display dialog "Select output format." buttons {".pct", ".jpg", ".pdf"} default button ".pdf"
				set output_format to button returned of format_return
				set AppleScript's text item delimiters to "."
				set base_filename to the first text item of file_name
				set img_path to desk_path & base_filename & output_format
				tell me to convert(an_item, img_path, output_format)
			end if
		end tell
	end repeat
end adding folder items to

on convert(img_file, img_path, output_format)
	tell application "Image Events"
		launch
		set image_ref to open img_file
		if output_format is ".jpg" then
			save image_ref in img_path as JPEG with icon
			delete img_file
		else if output_format is ".pct" then
			save image_ref in img_path as PICT with icon
			delete img_file
		end if
		close image_ref
	end tell
end convert
Alan
alanwatts is offline   Reply With Quote
Old 08-13-2004, 12:57 AM   #6
roncross@cox.net
MVP
 
Join Date: Jan 2004
Posts: 1,764
Just download snapclip

If you download snapclip, then it will do what you are asking.

http://www.pixture.com/


Try Snapclip. It's free and it works great. You can output snapshots in JPEG, TIFF, PICT, PNG, PSD, clipboard, and others. In addition, it will give you a clipping so that you can see the picture when you are looking at the icon. It does some other neat screen capture techniques like real time, on the fly, freeze and os x standard. Even if you select os x standard with Snapclip, you can still specify an output of your choosing. This will solve your problem.

thx
RLC
roncross@cox.net is offline   Reply With Quote
Old 08-13-2004, 11:11 AM   #7
rotero
Triple-A Player
 
Join Date: May 2004
Location: Brighton, MA
Posts: 193
Quote:
Originally Posted by roncross@cox.net
If you download snapclip, then it will do what you are asking.

http://www.pixture.com/


Try Snapclip. It's free and it works great. You can output snapshots in JPEG, TIFF, PICT, PNG, PSD, clipboard, and others. In addition, it will give you a clipping so that you can see the picture when you are looking at the icon. It does some other neat screen capture techniques like real time, on the fly, freeze and os x standard. Even if you select os x standard with Snapclip, you can still specify an output of your choosing. This will solve your problem.

thx
RLC

Does anyone know how to change the keyboard shortcuts within this application so that it can replace the OS X cmd-shift-3 and cmd-shift-4 screen capture functions?
rotero is offline   Reply With Quote
Old 08-13-2004, 03:48 PM   #8
roncross@cox.net
MVP
 
Join Date: Jan 2004
Posts: 1,764
change the keyboard shortcut to snapclip

I believe the hot keys are set in SnapClip Preferences. However, there is a Hack that will work around this. In order for you to following along, I am assuming in SnapClip that Command+Shift+8 is set to capture mode "os x Standard" and that the output Destination is set to "JPEG File". After you understand the steps, you can of course set these snapclip configurations to anything you like.

Here are the steps that I did to make JPEG the output using command+shift+3.

First quit SnapClip

Second open up "System Preference", click on "Keyboard & Mouse", click on "Keyboard Shortcuts" tab. In the column under description, there is an entry that reads "Screen Capture". If the arrow next to "Screen Capture" is pointing to the right, click on it so that it points downward. Uncheck "Capture to screen to file", notice that this is the command+shift+3 command. Close "System Preference".

Third, If you don't have Butler, download it at the following:

http://www.petermaurer.de/nasi.php?t...prache=english

Fourth, After downloading Butler, configure it by doing the following:

Under Configuration, look at the bottom of the window and you will see a button with a "+ sign with a down arrow next to it", next to that, you will see a button with a "-" sign. Click on the button with "+ sign with a down arrow next to it", Click on "Smart Items", Click on "Keystrokes"

A Keystroke will be added to your configuration file. On the right side of the configuration window, find the section that is titled "Keys", click inside the box. Press the command+shift+8 button as though you are taking a pictue. You will see your keystrokes appear in the box next to "Keys". Remember to make sure that you have quit SnapClip as discussed in step one.

Fifth, find the Hot Key section under the Keys section on the right side of the configuration windown. Hot Key is located under Abbrev, click in the box next to "Hot Key". Press command+shift+3 as though you are taking a picture using standard screen capture. Remember to make sure that the screen captaure is disabled in System Preference as discussed in step two.

Sixth, close Butler configuration window, launch "SnapClip" and now you can press command+shift+3 and have all of your output in JPEG. However, you still have the option to type command+shift+8 to do the same thing.

I hope that this helps.

thx
RLC
roncross@cox.net is offline   Reply With Quote
Old 08-13-2004, 08:37 PM   #9
rotero
Triple-A Player
 
Join Date: May 2004
Location: Brighton, MA
Posts: 193
I've tried Butler before, but I wasn't a big fan of it. So I did pretty much the same thing you described with iKey instead. I don't know why I didn't think of that to begin with.

I set cmd+shift+8 in SnapClip to Capture Mode: "Freeze" and Output Destination: "On the Fly." Then I set up a sequence in iKey that is called by cmd+shift+3. The sequence is one step long - just a key press of cmd+shift+8. I used the Freeze mode in SnapClip because OS X Standard mode doesn't allow a true full screenshot - only individual windows or the blank desktop. Freeze mode gives you a crosshair (just like OS X's built-in "Capture selection to file") with which you can select the section of the screen you want to capture - if I want one window or the menubar, I select just that much; if I want the whole screen, I select the whole screen. I may change the "On the Fly" option to JPEG because I don't think I'll make much use of any of the other formats.
rotero is offline   Reply With Quote
Old 08-13-2004, 09:08 PM   #10
roncross@cox.net
MVP
 
Join Date: Jan 2004
Posts: 1,764
Simple concept isn't it.

I didn't know what you had to work with so I offered what I used to make this work. I am glad to see that it works in iKey as well. I am a big fan of Butler and I think that you should reconsider using it.

thx
RLC
roncross@cox.net is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 03:11 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.