1 Reply Latest reply on Mar 25, 2013 3:16 PM by [Jongware]

    Getting maximum quality export for InDesign images or graphics

    KuddRoww Level 1

      I'm extracting the images from an InDesign file for an ePub. I'm doing the ePub creating independant of InDesign, however with images I'm trying to preserve some of the work done by people in the past in formatting the images.

       

      What I'm finding is that the image is exported the same size as in the InDesign document, the problem with this is that if I zoom into the image it looks pixelated, whereas if I zoom into the original document it's not pixelated at all. Any suggestions on how to modify the following code to get a higher resolution export? While I appreciate that the image size is preserved, I'm wondering at what point in the export the image resolution is scaled down.

       

       

      function getImages(){

          for(var i = 0; i<app.activeDocument.pages.length; i++){

              for(var j = 0; j<app.activeDocument.pages[i].allPageItems.length; j++){

                  var pageItem = app.activeDocument.pages[i].allPageItems[j];

                  if(pageItem.constructor.name.match(/pdf|image/i)){

                      pageItem.exportFile(ExportFormat.PNG_FORMAT,File("~\\desktop\\epub2\\"+app.activeDocument.name.replace(".indd","")+"\\oebps\\images\\"+pageItem.itemLink.name.substring(0,pageItem.itemLink.name.indexOf("."))+".png"),false);

                      }

                  }

              }

          }

        • 1. Re: Getting maximum quality export for InDesign images or graphics
          [Jongware] Most Valuable Participant

          PNG export is done at screen resolution. In CS6, you can try setting the PNG export resolution (that property doesn't seem available in lower versions). If your version is lower than CS6, you could try up-scaling the original before exporting.

           

          Exporting *an*y page item to PNG converts it to a bitmap, even if the original is pure vector; so you'll *never* get an 'infinitely scaleable' graphic. All you get is a huge bitmap -- and its size increases squarely with an increasing resolution. (Approximately; PNG compression helps a bit, but it won't magically make a larger image a smaller file size than the original.)