1 Reply Latest reply on Nov 29, 2014 4:20 AM by matias.kiviniemi

    Opening File: Why is Pixel Width affected by Resolution?


      Simple code to open an EPS file and wanting to set its width to 500px. If I set the resolution to 72 it works fine. If I leave out the resolution line is ends up being about 7x as big (approx. 3500px). If I set the resolution to 300, the image is about 4x as big. In my mind resolution shouldn't affect the size of the image, because I'm working in absolute pixels and not inches. Any insight would be appreciated.



      app.preferences.rulerUnits = Units.PIXELS

      var fileRef = File(app.path+"/Presets/Scripts/BBY_FPO_Watermark.eps")

      var epsOpts = new EPSOpenOptions();

      epsOpts.antiAlias = true


      epsOpts.resolution=72   // if I omit this line or change this to a higher number the image gets much bigger than the 500px I specified below


      app.open( fileRef, epsOpts )