Tiff to JPG or PNG converter

Is there a program that can convert a group of TIFF formatted images to something else, like JPG or PNG? Right now what I'm doing is opening up Preview and then having to save each image one by one, which is time consuming. Is there a command line utility that I could do this with, or is there anything in OS X that does it?


Thanks.

MacBook Pro, Mac OS X (10.7.5)

Posted on Oct 3, 2014 4:34 PM

Reply
29 replies

Jun 5, 2016 9:17 AM in response to Kurt Lang

Kurt, that's technically incorrect about what you say about the clipboard. The clipboard is not holding just a raw set of bytes but it also includes the type of the data along with it. And usually, the clipboard contains several representations of the same data (called flavors), e.g. for images, it may contain the data in TIFF, JPG and PNG format. Well, more precisely, it usually only contains one of them (but it may contain more), and if an app requests the data, it can request it in one of the other formats and the clipboard will automatically convert the data accordingly.

Same for text content in a clipboard: There's always a plain text representation but there may also be styled (rich) text, even PDF, representations of it, and you can pick out whichever you prefer.


In other words, the Clipboard DOES know the type of data it holds, and can convert it if needed due to that fact.


To see all the flavors in the clipboard, use this AppleScript line:


get the clipboardasrecord

In fact, it might even be possible to use the Clipboard for image conversion operations, though it'd overwrite the current clipboard contents, and one cannot easily preserve and restore them, AFAIK, using AppleScript. On the OS framework programming level (e.g. Cocoa), there are parallel Pasteboards that could be used for this without disturbing the user's clipboard, but that's not available through default AppleScript APIs. ... Giving this some more thought, though, it seems one cannot use the Clipboard for img conversion just because there's no way to load the contents of a file into the clipboard and vice versa. Or does someone know a way?

Jun 5, 2016 11:46 AM in response to Thomas Tempelmann

It sounds logical, but it's also quite impossible. As I said, TIFF, JPG, PNG, PSD, etc. are, and can only by file types. You read them from the drive, or you write them. Once in RAM, they are uncompressed pixel data waiting for you to do something with it. The OS does keep track of some image tagged data on the clipboard, such as the image's color space. If it didn't, it would have no way to translate the color correctly into a different color space when you write the image out to another file, or paste it into an image editor.


Photoshop or any image editor is the same. The file is read from the drive and from there, is an uncompressed series of pixels. Think about it. How would Photoshop, or the clipboard know what to do with a JPEG if you read it in from disk as straight up compressed data? You wouldn't be able to view it in Photoshop since the data has not been expanded from its compressed form into an image you can work on. How would the clipboard write the compressed data of a JPEG to a TIFF? It wouldn't have all of the individual pixel data to work with, so it would be literally impossible to save the image out to another file format that looked like anything recognizable.


You can't apply what can be done with text on the clipboard to images.

Jun 5, 2016 12:00 PM in response to Kurt Lang

What's your background on this? Are you a programmer? Because I am, and I know pretty well how the Clipboard / Pasteboard works. Your explanation seems to come from a layman's view, without actual understanding of the programming interface below it, at least it sounds to me like that.


Files on the Mac nowadays determine the content's type by the file extension, which is mapped to a UTI (e.g. both .jpg and .jpeg map to the UTI "public.jpeg"). And the clipboard contents use the same UTIs to determine each stored flavor. So, both files and the clipboard know the types, one way or another. That's all I was saying, and you seem to make something dubious out of it. I don't understand what you're getting at there. I just wanted to help clarify things for others. If you don't agree, I won't further comment on that as that only leads to an endless and useless discussions, I'm afraid.


I also did some digging on my idea about using the Pasteboard for img conversion. And it's actually possible with AppleScript, but using the fairly new ObjC bridge. Though it's not easy to accomplish, here's a start on the idea, for anyone who's interested: http://macscripter.net/viewtopic.php?id=44929

Jun 5, 2016 12:18 PM in response to Thomas Tempelmann

I also did some digging on my idea about using the Pasteboard for img conversion. And it's actually possible with AppleScript, but using the fairly new ObjC bridge. Though it's not easy to accomplish, here's a start on the idea, for anyone who's interested: http://macscripter.net/viewtopic.php?id=44929

That's where I start wondering how this is functional.

Sure, I'll stipulate the clipboard may be able to convert the data. How do you tell the clipboard to paste a png as a tiff?


This does go back to the custom icon well in Get Info which will accept pasting just about any image format. Does the clipboard convert the data or does the background process of the Get Info window?

Same with any App. You paste in a tiff and it wants a png. I would always assume the app did the conversion, not the clipboard.

Seems a waste to program the clipboard with a bunch of conversion routines when an app should be doing the conversion to whatever it wants.

Jul 30, 2016 6:04 PM in response to Kurt Lang

Just as a giggle -- I ended up trying to "command control shift 4" to simple capture something to cupboard and paste it into an email -- it never sent as a picture or attachment (it went out as a question mark in a box) so I went looking (again - 2 years later) for how to do this -- I found my previous question posted just as I was searching again for the same thing! I understand it better this time around! Thanks!

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.

Tiff to JPG or PNG converter

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