# LR Mogrify compress to file size, file sizes different



## Luke KC (Oct 12, 2009)

I jsut love the LR Mogrify plugin, which allows tons of flexibility on export. I especially like the "compress to file size which comes is very handy for maximising image quality for a given file size.
Although.. I am finding that the compress to file size, is not accurate with the actual file size produced.. If it was pretty clsoe then I could accept it, but I am seeing pretty large variations in final file size.

If I set the file size to 36'kb, the final size is anything from 2''kb to 32'kb. If I set the file size to 1'''kb, I see file sizes around 8''-85'kb It doesn't matter if I have borders, watermarks or fixed file dimensions or stripped metadata, I seem to always get file sizes smaller than the set value.

Is anyone else seeing these variations, or are they accurate ? Or will I jsut have to accept this as being as good as the compress to file size get ? I would like to be able to set it to 1'''kb and the file size be really close to that.. 

Any feedback appreciated.


----------



## Denis Pagé (Oct 14, 2009)

The "Compress to Filesize" is designed to avoid reaching a maximum more than to achieve it. Also, it works by trial and error and stop when the condition is satisfactorily met to avoid endless _(read: too many)_ program loops. Asking it to reach the given value to the best compression, meaning just before the maximum given is passed, would mean a few more _iterations (4?, 5?, 6?..)_; and then users would complain that the export is much too slow to be usable.

If you need a real maximum, then use it as it is. But if you maximum is just a wish, then increase your max value by some percentage and you should be close altough, sometimes slightly over.


----------



## clee01l (Oct 14, 2009)

Compression sizes are smaller if the colors are more monochromatic. (i.e. blue sky, White snow.) files will compress larger is the image is 'busy' with lots of small color changes. No two images should compress to the same size even if they are of the same scene. This is normal and the nature of the compression algorithm and the variability of the images.


----------



## Luke KC (Oct 14, 2009)

Both very valid points gents, I do appreciate it.. Understanding how the compression step works may help explain the problem. I was expecting long export times, since in the quickguide it ways up to 9 JPEG conversions are required.
I just thought that was the whole point of the compress to file size ? Was to compress it to a particular file size.. Maybe I was expecting too much.. But It really does not produce consistent results for me..
I exported the same image 6 times, with incrimental file sizes from 35'kb, 45'kb, 55' kb.. all the way up to 1'''kb.. EVERY file exported came out at about 313kb.. regardless of what filesize was set.. Is that really the way I should expect it to work ? Small variations slightly below the filesize set is completely acceptable, but I seem to see very larger differences and little consistency to make working with it really predictable.

I guess I was expecting too much then..

Thanks for replying..


----------



## sizzlingbadger (Oct 15, 2009)

If the minimum jpeg compression gives a file of 313Kb it's not going to pad it out to make it bigger just because you stated a bigger size.


----------



## Luke KC (Oct 15, 2009)

Thank Nik, but I'm not sure I understand that statement..
what do you mean by the minimum jpeg compression ?
I'm not expecting it to pad it out ? I'm just expecting the best quality possible for the a given "compress to file size"..

Sorry, this must be over my head.. but I have seen other editing programs that show final file size estimates, as you slide the quality slider. Isn't this the same idea ? Or is it not able to calculate it that exactly ?

I do appreciate the comments to help me understand.


----------



## Denis Pagé (Oct 15, 2009)

[quote author=Luke KC link=topic=8'78.msg5521'#msg5521' date=1255584543]
Thank Nik, but I'm not sure I understand that statement..
what do you mean by the minimum jpeg compression ?
I'm not expecting it to pad it out ? I'm just expecting the best quality possible for the a given "compress to file size"..[/quote]
To see what he means, try this Luke: Do not use "Compress to Filesize" and make a normal export same size to JPEG at quality 1''. Does it reach the maximum you wanted? If not, this means it had to inflate rather than compress to reach your set maximum.


----------



## Denis Pagé (Oct 15, 2009)

Luke! You started this thread on october 11th. In his "Change Log", Tim Armes state this:

"Version 4.13, 12th October 2''9
...The previous fix to the "Compress To Size" option resulted in reduced image quality images compared to the previous version. This has now been addressed."

Actual version is 4.14 fixing presets selection problems.


----------



## Luke KC (Oct 15, 2009)

Denis,

Firstly, 
The example you said would definately reach the maximum file size. The file size I am trying to obtain is a reduced file size from what the full size jpg would be. That's why I'm trying to use the "compress to file size" feature.. ? I shoot RAW 12mp images, so the full size jpg exports are in the 6-12mb range (obviously it varies depending on content), so well above ? Not sure that helped me understand at all.. I don't think "padding" should even be an issue. I have images that full size export around 8mb, and I want them to export at the best quality possible at say 1mb.. 

Secondly
I think that the fix that you mentioned in V4.13 to the compress to file size was from a different issue. Which I experience also.
It would export with extremely reduced image quality, to the point of unrecognisable images.. Very blocky and limited color range. I'm sure that was what the problem was. I can attach an image of one I did (If I saved any), when I get them tonight.

Thanks for replying, but I guess the question still remain..
Is this inconsistency how I can expect the "compress to file size" function to work ?

Can someone else try export an image 5 times at 5 different "compress to file size" values.. Are you getting file sizes anything close to the requested filesize.. Say your full size jpg export is 6mb, try a 5mb, 4mb, 3mb, 2mb,1mb "compress to file size" version and see what the file sizes come out at..


sorry, I'm really not trying to be a pain in the a$$, just trying to get this working.. But all the feedback seems to be telling me I'm expecting to much..
I really must not understand the nature of the compression..

Luke


----------



## Luke KC (Oct 15, 2009)

Victoria..

Sorry if this was placed in the wrong area. It stated under the forum title "Lightroom Plugin discussion" that: Please post all troubleshooting, even for plugins, in the Troubleshooting Forum.

I figured this was trouble shooting, so that's where it went.. my appologies if not..


----------



## Victoria Bampton (Oct 15, 2009)

Luke, no worries, I haven't read the blurb at the top of the Troubleshooting forum lately, so it sounds like you put it in the right place. I'll have a word with the other Mods and see where they'll go in future, and if the wording needs changing, as I'm thinking that plugin stuff would probably be better off in here, so that it's out of the main forum traffic for those less interested in plugins.


----------

