converting j peg to jpeg 2000

I have a large amount of jpeg files which I wish to convert to j peg 2000 because of their better stability over time. I have been saving files as TIFF but their size is now getting a bit much, given that I have about 850,000 files.

At present I individually open each file in Preview and from "File">"Export" I am presented with a drop menu which I have to change everytime from jpeg to jpeg2000 and from 75% to 100%.


Is there a way to block convert files or failing that, a way to change the default settings in Preview so that I don't have to change the format and size every time.?

Mac Pro (Early 2008), OS X Mavericks (10.9)

Posted on May 4, 2014 2:35 AM

Reply
20 replies

May 4, 2014 5:44 AM in response to leomonkeyhanger

You can set up a 'workflow' using the Automator application from your Applications folder.

For example:


When Automator opens, it should ask 'Choose a type for your document' choose workflow.

Then under the library in the first column on the left go down to files and folders and click once,

then on the second column got to 'ask for finder items', double click.

This will now show up in the third column on the right, please be sure to check the multiple files

box. The default place to start a search for files is the desktop, but you can change that according

to how you work and as confidence grows. next go back to the second column and navigate down to

'copy finder items' double click this to add to the workflow on the right. The default location to copy items to

is the desktop, but at this point it is best to choose or make a new folder using the drop down menu.

next go back to the first column on the left and click on 'photos', then in the second column double click on

'change type of images'. The default conversion is to Tiff but you can change that to Jpeg 2000 using the drop down menu. The workflow should be ready to run, using the play button on the top right.

Please be sure to experiment before commiting a large amount of files. Always check and remember to save the workflow (the export dialogue under 'File').

Hopefully this will get you started, and after a bit of experimentation you may want to add other options to this, or make your own workflows.



User uploaded file

May 4, 2014 7:05 AM in response to leomonkeyhanger

Thanks it should work ok.

Please note. The image i sent with my first reply can be previewed by clicking once on it.

There is however a mistake in that the image has a fourth step in it, but please ignore that. it should just be the first three steps as described.


Please make sure to test it thoroughly before commiting hundreds of files to the conversion,

you won't lose the originals with this 'workflow', but lets just be safe.

Make a folder on the desktop 'Test' fill it with say ten random jpegs (make sure you have them backed up elsewhere), select this folder in the first section under the dropdown menu, navigate down and click on 'other'

then choose the 'Test' folder and then select all the images in that folder. Then in the second section either choose a pre-defined folder as the destination from the drop down menu or, create one under 'other' then new folder and give it an appropriate name. Once all three actions are ready, click the run/play button on the top

right, once the workflow has been run check the two folders. One should have the original jpegs, and the second should have the jpeg 2000 files. you can use the 'results, options and description' buttons in each action to view what is happening. This is just to get you started, in time with experience and confidence you can make your own workflows with more actions etc to suit your needs.


If you have Photoshop you can also set up actions for batch processing files, where you set up an automated task similar to this using the "Actions" window and its recording options.

But for now automator will do.


Good Luck.

May 4, 2014 3:01 PM in response to leomonkeyhanger

Hi leo,

I saw your post this morning and it looked interesting, sat down tonight and came up with the same solution as Eau. I tried Applescript but could not get jpeg2000 to work, someone will know.


It is very straightforward, follow Eau advice about testing and you should have it working in a very short while.


I only tested it with 7 files but it seemed ok.


Always have a copy of your original TIFF's on backup media untill you are confident with the process, in fact if you can afford the media you could keep them safe offline for future use if required.


User uploaded file

May 5, 2014 3:30 AM in response to leomonkeyhanger

hello again, in Rack0s screenshot you can see that his script/action for 'change type of files' is using the Pixelmator application to convert the files, I don't have Pixelmator so can't say if that is where the glitch with converting to jpeg 2000 may have been. I was using the Preview applications 'change type of files' to convert.


From your initial post you pointed out that when you were manually converting you were also able to move the slider to 100%. The option doesn't come up in this batch process but does save the new Jpeg 2000 files

1:1 with the original jpeg. I have also attempted it with tiff files. In my case I was converting 50Mb files

to jpeg 2000. The conversion to jpeg 2000 resulted in files of 3.5Mb. One thing I noted was that it did change the dimensions, from 35cm x 35cm at 300ppi to 145cm x 145 cm at 72 ppi, but keeping the pixel dimensions the same.Viewing both in Photoshop at 'actual pixel size' I was pleased with the result, there was no obvious degradation of the image. So Preview's own conversion is pretty good, of course there are many other apps like Pixelmator or Graphic Converter (VikingOSX) which can batch process files, perhaps easier/ faster and better. So its really up to asking around and getting advice in places such as this, to see which may suit your needs best.


All the best.

May 5, 2014 5:09 AM in response to rack0 tack0

Oh absolutely, the answers to his question were all great, but the necessity to convert was based on a myth. The OP should research that before committing.

Another good suggestion would be to use Aperture or even iphoto for the entire collection, where all edits are confined to metadata and the original is never re saved or degraded by edits.

May 5, 2014 6:23 AM in response to leomonkeyhanger

I have a large amount of jpeg files which I wish to convert to j peg 2000 because of their better stability over time.

That doesn't make even a slight amount of sense. There's nothing more stable about JPEG 2000 than there is for TIFF, standard JPEG, or any other raster format. You can either open them, or you can't. And the only reason you couldn't is that the files were damaged somehow. And that can't happen by just sitting there. A drive could be 1000 years old, and as long as the drive is still readable (and software still exists to open the files), a TIFF or JPEG will still open just as readily as JPEG 2000 file.


By converting from JPEG to JPEG 2000 you are only succeeding in making your images worse! You're taking a lossy compressed format, opening it, and saving it to yet another lossy compressed format. In other words, you're compounding the permanent data loss.


When you do such a conversion, it isn't just rewriting the JPEG to JPEG 2000 without doing anything to the image. It first has to open the file as an uncompressed image (and no, you don't get the original uncompressed pixels back before it was saved as a JPEG), then save it with yet more lossy compression reapplied as JPEG 2000.


If you want to save your images with the best possible image integrity, but still compressed, then save your TIFFs as a TIFF with LZW or ZIP compression. Both of these compression schemes are lossless. You could open and save a file a billion times and assuming no errors occurred, not one pixel of the image will be the slightest bit different from the first time it was saved. You won't save as much space as even the least compressed JPEG (highest quality), but your images will preserve 100% of their original values.

May 5, 2014 7:16 AM in response to rack0 tack0

Hi Rack0


I hope you don't think i was disrespecting your advice, I perhaps read your message wrong in the first place and attributed the glitch to Pixelmator. Apologies for that.


Anyway looks lke our advice has helped in the interim. Along with others advice re different apps, lossless compression when saving as a tiff, etc,etc.


Hope you are enjoying Bank Holiday Monday


All the best



Eau

May 5, 2014 10:05 AM in response to Kurt Lang

Thanks to all the people who've taken time to make a contribution, advice which I really appreciate.


Perhaps I would have been wiser to choose my words better, that way I would have confused you less.


I first began recording files and documents about 15 years ago and when upgrading computers, backing up files and transferring data, did not initially realise that jpegs deteriorated every time you transferred them from one format to another. By the time I realised, the files were heavily degraded and in research I found that TIFF's, although larger, were less likely to degrade in transferance than jpegs. For that reason I started saving in TIFF form but, as the numbers increased so did the storage for the data and now need to reduce them in size.


Having researched it appeared that jpeg 2000 solved both problems in that they were more stablewhen transferred and smaller in size. I may or may not be wrong in my belief and, yes, in an ideal world, data stored many years ago would reopen but the media in which we stored them will not, magnetic tape, floppy discs, CDs, DVDs, Blu Ray, SSDs, not to mention documents initially created in Pages 08 will not open with Pages 13, hence the need to transfer data from one medium or program to another.


I hope I have made the right choice and that the images and documents I have created and burned to gold Blu Ray discs will survive me. Only time will tell.


Thanks again

Leo

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.

converting j peg to jpeg 2000

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