Skip navigation
Currently Being Moderated

Batch change jp2 files to Photoshop (CS3)

Jun 29, 2012 6:07 PM

I found a website that allows you to download old (public domain) books. Each page is saved as a jp2, which I can't open in Photoshop CS3. I found an plugin that enables me to open them, and I could have sworn it was working, but it suddently stopped working for some reason.

 

Anyway, I have a folder full of folders with over a thousand jp2 images. I can open them in Pixelmator and save them as Photoshop files, but that's very time consuming. So, can anyone tell me if there's a way to do a batch change - convert every jp2 image in the folder to a format that I can open in Photoshop CS3?

 

Also, can anyone recommend an online guide to batch changing. I'd like to learn how to batch change file sizes; for example convert all images that are 4,000 pixels wide to 500 pixels wide. I'd also like to learn how to batch change file names. I probably have to pursue each of these separately, but I just wondered if there's some sort of online central guide to batch changing.

 

Thanks.

 
Replies
  • Noel Carboni
    20,993 posts
    Dec 23, 2006
    Currently Being Moderated
    Jun 29, 2012 6:16 PM   in reply to GeoBear

    Have you looked into the freeware viewer IrfanView?  I believe if anything can see your files that viewer can.  Perhaps you won't have to convert them at all.

     

    http://www.irfanview.com

     

    -Noel

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 29, 2012 6:53 PM   in reply to GeoBear

    If the downloads are free maybe you could link so we can get one of the files.

     

    Or post one here using a service like acrobat.com, which is free.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 29, 2012 7:08 PM   in reply to GeoBear

    I don't think you have to post one here as we can download the images from that site.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 29, 2012 7:32 PM   in reply to GeoBear

    ".jp2" is just the file extension for JPEG 2000, which a number of applications can open, including your Photoshop CS3, Photoshop 13 ("CS6"), Apple Preview, GraphicConverter, Safari, Firefox, etc..  Just install the JPEG2000.plugin from the Optional Plug-Ins folder in your CS3.

     

    Take a look here:

     

    http://www.fileinfo.com/extension/jp2

     

    Mac OS X Logo
    Mac OS
    IconApple Safari
    IconApple Preview
    IconAdobe Photoshop CS6
    IconAdobe Photoshop Elements 10
    IconLemkesoft GraphicConverter
    IconSnap Converter
    IconGoogle Chrome
    IconMozilla Firefox
     
    |
    Mark as:
  • Currently Being Moderated
    Jul 1, 2012 1:59 AM   in reply to GeoBear

    Ok, here is one way to convert your jp2 files to jpg

    First make sure you can see the documents in Bridge if so continue.

     

    Find ExtendScript Toolkit on your system and open it. This gets installed at the same time as Photoshop.

     

    Make sure you have navigated to the folder where you have the jp2 files in Bridge.

     

    Copy and paste the following code into ExtendScript toolkit and run the code.

     

     

    #target bridge
    app.document.deselectAll();
    var thumbs = app.document.getSelection("jp2");
      for(var i = 0;i < thumbs.length;i++){
       if(thumbs[i].spec instanceof File){
        var thumb = thumbs[i];
        var bm = new BitmapData(thumb.spec);    
                      bm = bm.rotate(thumb.spec.rotation); 
                      var Name = decodeURI(thumb.spec.name).replace(/\.[^\.]+$/, '');
                      var exportFilePath = app.document.presentationPath + "/" + Name +".jpg";
        bm.exportTo(new File(exportFilePath),100); 
            }
        }
    
    

     

    Bridge will then create a duplicate of the jp2 files but as jpg in the same folder.

    Yes Bridge can create files

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 1, 2012 8:57 AM   in reply to GeoBear

    They should be the same size as the original files. Sorry but you can only create JPG files in Bridge itself. You can select the files you want then run Tools - Photoshop - Image Processor to change the files to whatever format you require.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 1, 2012 9:51 AM   in reply to GeoBear

    No they are not thumbnails, they should be the full size of the original image as no resizing is being done. Is there any you could post a link to one of the files so I can do some tests?

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 1, 2012 10:55 AM   in reply to GeoBear

    If you don't have the install cd you can download the extra content for cs3 here:

    (be sure to follow the directions on the page)

     

    http://prodesigntools.com/download-adobe-cs4-and-cs3-free-trials-here. html

     

    On windows with that plugin the files from that site open in cs3 and you could use the File>Scripts>Image Processor to convert the files to regular jpegs.

    Or make an action using file>save for web or use Paul's Picture Processor:

     

    http://www.scriptsrus.talktalk.net/

     

     

    This the plugin version from cs3

     

     

    Untitled-1.png

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 1, 2012 10:59 AM   in reply to Paul Riggott

    Paul,

     

    This is where i got the test files from: (post 5)

     

    http://www.biodiversitylibrary.org/

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 1, 2012 12:31 PM   in reply to R_Kelly

    Thanks for that. I downloaded  the Indian Insect Life (1152 files) I am not seeing a problem here, the converted jpgs are the same size as the originals.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 1, 2012 2:22 PM   in reply to GeoBear

    Ah, I have done some more tests onanother machine that has CS3 installed and found that this does not read the correct size of jp2, and does not read the correct size of cache files!

    I wonder what size of JPGs you were after?

     

    Here is another version that should work with CS3 but only upto 1024 pixels on the longest side...

     

     

    #target bridge
    app.bringToFront();
    function main(){
    app.document.deselectAll();
    var thumbs = app.document.getSelection("jp2");
      for(var i = 0;i < thumbs.length;i++){
       if(thumbs[i].spec instanceof File){
        var thumb = thumbs[i];
        app.synchronousMode = true; 
                        bm = thumb.core.preview.preview; 
                        app.synchronousMode = false;
        bm = bm.rotate(thumb.rotation); 
                    var Name = decodeURI(thumb.spec.name).replace(/\.[^\.]+$/, '');
                        var exportFilePath = app.document.presentationPath + "/" + Name +".jpg";
        bm.exportTo(new File(exportFilePath),100); 
            }
        }
    };
    main();
    
    
     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points