Skip navigation
jimkeir
Currently Being Moderated

Using jpeg_limitSize

Jun 13, 2012 6:54 AM

Hi all,

 

I'm having trouble getting the "LR_jpeg_limitSize" option to work when using an LrExportSession created in a script, in LR4.0 and 4.1 . I've not tested in older versions yet.

 

It doesn't seem to matter what values are assigned, the size limit is never enforced. I've been varying what seem to be the relevant parameters - namely LR_jpeg_limitSize, LR_jpeg_useLimitSize and LR_jpeg_quality but only varying the quality value makes any difference to the resulting file. Not setting quality at all seems to make it use a default value of 0.6, but still not honour the limitSize value.

 

Does anyone have any experience of this? It works as expected when exporting from the GUI, but not from a script.

 

Cheers,

Jim


 
Replies
  • Currently Being Moderated
    Jun 13, 2012 2:03 PM   in reply to jimkeir

    Consider looking at source code here, which does something similar:

     

    http://www.robcole.com/Rob/ProductsAndServices/MiscLrPlugins/#ExportPe rcentResize

     

    But, in a nutshell:

     

    * Dump the export parameters using something like Debug.lognpp from John Ellis debug toolkit.

    * Look for the option that enables the LR_jpeg_limitSize paramater to do it's deed.

     

    Or,

     

    * Save an export preset that has the limit size enabled.

    * Save an export preset that has the limit size disabled.

    Compare them

     

    Rob

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 14, 2012 1:15 AM   in reply to jimkeir

    I guess I don't know then.

     

    I've never had a problem with:

     

    local es = LrExportSession{ photosToExport=photos, exportSettings={

         -- whatever I want, e.g. LR_this = that...

    }}

     

    es:doExportOn...

     

    But maybe you've stumbled into a bug I'm not aware of.

     

    Good luck,

    Rob

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 14, 2012 1:22 AM   in reply to jimkeir

    Dunno if export-percent-resize is the best example, now that I think about it: It doesn't create the export session in the above-mentioned manner (it's an export filter).

     

    But you can look at the exportTif function in the NxToo.lua module of the NxToo plugin, which does something more like what you are trying to do I think:

     

    http://www.robcole.com/Rob/ProductsAndServices/NxTooLrPlugin

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 14, 2012 2:21 AM   in reply to jimkeir

    Post code snippet and perhaps somebody can see the problem?

     

    R

     
    |
    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