I would like to have my images paste into mail as jpegs,gifs,pngs, whatever the source format, rather than being converted to TIFF format which is not viewable by a large number of users.
To change the clipboard, in terminal one writes:
defaults write com.apple.screencapture type jpeg
Is there a similar command that will change the default image formmat for mail?
doug123a wrote:
Hmm, maybe Windows handles this better.... Ha!
There's no maybe, this stinks on ice.
Right-click on an image in Firefox, copy and paste it into Mail.
Now right-click the image and open with Preview and it says "pastedGraphic.tiff". Now change the image size in mail to something smaller than actual, view it in Preview again and now it says "pastedGraphic.jpg", in Mail change it back to acutal size, view in Preview and now it's "pastedGraphic.tiff".
Do this with Safari and it transfers with the proper file name and format.
Has anyone worked out if there is a permanent solution to paste-as-tiff ?
Paste meaning paste of a rectangle of image in the clipboard rather than drag/drop of an image file, or copy of a file (that happens to be an image) and paste into Mail.app's compose window.
This was certainly a rather mixed-bag topic, and pretty far off the mark. If you find a JPEG file, and copy it, and then paste into a New Message it is not changed to TIFF. The conversion to Tiff is limited, in my experience and testing, to images contained within HTML text, and this is what causes the conversion, because you are pasting both text and image -- the text is the actual link of where the image resides on a server. To see this, control-click on an image in a page on Firefox, and choose Send Image -- you will see that it results in a New Message window with the link of where the image is located, ending in .jpg -- but it is not the image.
Open the same page in Safari, and control-click on the image, you see that the resulting contextual menu has a different set of choices, one of which is to Copy the Image, but the result is different as others have pointed out.
This action is not due to anything in Mail, but rather to the contextual menu that is implemented for use in Firefox vs Safari.
Wow, you'd think a simple question would deserve a simple answer. Good info but, way off topic. I challenge anyone to do what I believe "madpixl" was trying to do over a year and half ago without getting a pasted TIFF.
1. Cmd-Shift-4.
2. Using the crosshair select an area of your screen.
3. Open mail, select File > New Message.
4. Tab into the body and type Cmd-v.
5. Right click (Ctrl-click) the image you just pasted and select "View as Icon".
6. Now the challenge... tell me that's not a .TIFF image. If you still think it's incognito, try sending it to a windows user.
defaults write com.apple.screencapture type jpeg
That does not change the clipboard format (since there really is no "format" for the clipboard). It changes the screen capture (Command Shift 3, Command Shift 4) format.
If you right click - copy, it copies in the original format.
OK, didn't mean to ruffle anyone's feathers. I was probably too quick to interpret the original question with a frustration of mine own.
Very often I find the need to just grab a piece of the screen that I'm seeing and quickly send that off in a response to a client email. I'd like to do this without the tedious process of re-saving it via Preview or any other image application.
Just wish I could change the format that a simple screenshot pastes into mail.
Reading thru the forum I would have guess the terminal command would work. It did not. So, I tried use your Save Screenie recommendation. This didn't work either. Do I need to delete the pref file or something? It's lock into using TIFF's no matter what I try.
Ernie Stamper wrote:
I am curious -- what is it that you need screenshots of to send to people without Macs, considering that many things will copy/paste without a screenshot?
Ernie
I do web design and development. Very often I need to grab a piece of what I'm seeing in the browser and send it to my client for discussion. Much of what I need to grab is a composite of images that make up a rendered page in the browser which I cannot right click to copy/paste. The point is there are many ways in which I could use a simple Cmd
Shft4, select what I need - paste into mail and have it be in a format (JPG) that would nearly guarantee visibility on the other end.
I do that sort of thing with SnapZ Pro, and my output format of choice is PDF. But its preferences will allow choosing JPEG as output file type. It uses Cmd
Shift3 to invoke. Little Snapper does much the same thing, I believe, with similar command sequence.
..."
1. Cmd-Shift-4. 2. Using the crosshair select an area of your screen. 3. Open mail, select File > New Message. 4. Tab into the body and type Cmd-v. 5. Right click (Ctrl-click) the image you just pasted and select "View as Icon". 6. Now the challenge... tell me that's not a .TIFF image. If you still think it's incognito, try sending it to a windows user. "...
Note that the Cmd-Shift-4 shortcut saves the screenshot to a file - it won't go to the clipboard without including the Ctrl key (which can be used with the other screenshot combinations as well).
Hence going to step 4 (Cmd-v), you aren't pasting your new screencapture, but rather what was previously in the clipboard - if that happens to be the "raw" image data (eg. from selecting "all" or a region, and copying out of a graphics programme), the system clipboard uses TIFF format, as "chris_R" has been saying, so you will end up pasting TIFF while your screenshot sits unused on the "Desktop".
Cmd-Shift-Ctrl-4 should send the screenshot data to the clipboard using the format specified in the .plist file. Third-party software should not be required for this.
After looking for an answer to this problem, and not finding one...and then after banging my head against AppleScript for a few hours, I finally came up with this workaround. It's not perfect, but it suffices for what I need--making copy/paste of images from Gimp to Mail into JPEGs instead of TIFFs.
Open Script Editor and make a new script with the following contents:
*set tp to 0*
*repeat with i in clipboard info*
*if TIFF picture is in i then*
*set tp to the clipboard as TIFF picture*
*exit repeat*
*end if*
*end repeat*
*if tp ≠ 0 then*
*set dt to current date*
*set dtstr to (time of dt as string) & ".tiff"*
*set pt to ((path to temporary items from user domain as string) & dtstr)*
*-- display dialog "Temporary file is: " & pt buttons {"Ok"} default button 1*
*set tf to open for access file pt with write permission*
try *write tp to tf*
*close access tf*
*on error error_message*
*close access tf*
*display dialog error_message buttons {"Ok"} default button 1*
*end try*
*tell application "Image Events"*
launch *set this_image to open file pt*
*save this_image as JPEG in (pt & ".jpg") with compression level high*
*close this_image*
*-- delete the TIFF temporary file*
*set ptposix to POSIX path of alias pt*
*do shell script "rm " & quoted form of ptposix & ""*
*-- set the clipboard to the created JPEG file*
*set the clipboard to (alias (pt & ".jpg")) as «class furl»*
*end tell*
*display dialog "Done. A JPEG Image has been copied to the clipboard." buttons {"Ok"} default button 1*
else *display dialog "No TIFF image was found on the clipboard." buttons {"Ok"} default button 1*
*end if*
Save that in Home > Library > Scripts. Then you can either use the AppleScript Utility to "Show Script menu in menu bar", or save the script as an Application and drag it to your dock. There's probably a way to make it appear in the context menu, but I don't know how off hand. If you want to get fancy I'm sure there's a way to give it a keyboard shortcut.
After you copy something to your clipboard, run the script or application you saved, and it will convert what's on the clipboard to a JPEG file (saved in Home > Library > TemporaryItems) and copy a reference to the JPEG file back to the clipboard. Then, you can paste directly into Mail and it will be a JPEG.
The conversion process takes a few seconds, maybe worse on older hardware, but it gets the job done. At least, it works for me 🙂 .
This is fantastic, and does exactly what I need. However, when I capture a screenshot using shift-control-command-4, it is saved on the clipboard as a PNG file, not a TIFF. Do you know how I could modify your script to allow for this? I tried changing TIFF to PNG in the script but got the following error from Script Editor:
Syntax Error - Expected "then", etc. but found class name.
Thanks for the tip. I use Skitch when I want that functionality. It does much the same thing.
I just realised my previous post was incorrect. When I snap a portion of the screen with shift-control-command-4 it
is saved as a TIFF file to my clipboard. Or at least I assume so, because if I paste it into an email it is titled "pastedGraphic.tiff".
The problem is when I run the AppleScript above, I get the message "No TIFF image was found on the clipboard" every time. I incorrectly assumed it was because I had a PNG on the clipboard, but I assume there is just a problem with the script.
Here's what I am experiencing: While I am using Firefox, if I right-click and "copy image" a jpeg in a web page -- then right-click and paste that into the body of a message in Apple's Mail it will convert to a tiff and be more than ten times larger. If I do the exact same thing, but using Safari instead of Firefox, it stays a jpeg. Why? I'll leave that for smarter people.