Lightroom: How do an export an image to an exact file size (in MB)?

  • 1
  • Question
  • Updated 3 years ago
  • (Edited)
I have to export jpg pictures with 48.1 MB, with 300 dpi. If "don't enlarge" is checked, the pic is exported with the native camera size being smaller. if "don't enlarge" is not checked the file size is far more than 100 MB.

How can I solve this problem?
Photo of Hans Mitterer

Hans Mitterer

  • 3 Posts
  • 0 Reply Likes
  • anxious

Posted 3 years ago

  • 1
Photo of Steve Sprengel

Steve Sprengel, Champion

  • 2613 Posts
  • 333 Reply Likes
What does "I have to export jpg pictures with 48.1 MB" mean? Are you limiting filesize to 48.1 MB?

What resizing options are you using if any?

What compression options are you using if any?

Maybe show us a screenshot of your Export panel with the relevant sections expanded.

What are the original pixel dimensions of the images?
Photo of Hans Mitterer

Hans Mitterer

  • 3 Posts
  • 0 Reply Likes
The demand of a customer is to get files with exactly 48,1 MB. The original picture size is 4896x3264 if not cropped. (I don ́t think I am using any compression options accidentally, how would I do this in LR?)



Any other information needed?

I thank you for your answer.
Photo of Steve Sprengel

Steve Sprengel, Champion

  • 2613 Posts
  • 333 Reply Likes
Compression is controlled with the Qualitat slider which is set to 100 and is the least compression.
--
Has the client asked for 48.1 MegaBYTES or 48.1 MegaPIXELS? You've typed 48.1 MB in your message, here, but have specified 48.1 MP in LR. LR is doing what you've asked it to to, but you may be telling it the wrong thing to do.

In more detail, the place you've put the 48.1 is in the MegaPIXELS entry area which determines the pixel dimensions of the photo. Your native photo size is 4896 x 3264 = 15980544 / 1024 / 1024 = 15.24 MP so to create a photo that is 48.1 MP the image must be resized larger by the sqrt(48.1/15.24) or about 1.77 times larger in each dimension, or 8698 x 5799 pixels which at your specified Quality = 100 is huge filesize on disk, as you've seen.

If the client wants MegaBYTES then that goes in the Dateigröße beschränken auf specification, but in LR this is only the upper limit--files must be smaller than this. The MB of a file varies with the image dimensions and the compression/quality setting but a Quality of 100 at the native image dimensions is likely going to yield a disk filesize much smaller than 48.1 MB, so to attain a 48.1 MB file you'll need to resize up and then let LR vary the quality down until the filesize is just under 48.1. This will degrade the photo's quality, so I doubt this is what the client wants but if they are naively judging the quality of the photo by the filesize on disk what else can you do, although it'd be worth having a conversation to make sure you both have the same understanding what they want. Since there is some confusion over MB vs MP in this post, maybe there is a misunderstanding.

If MB is indeed what the client wants but saving the photo at Quality = 100 and native pixel dimensions (no resizing) yields a smaller photo on disk, try resizing to 200% and check the disk size, then 300% and check the disk size, and once you've found a multiple of 100 that yields something a bit larger than 48.1MB on disk, then enable Limit-file-size to 49255 and let LR try to match 48.1MB. I think LR is going to give up when the filesize is close by under 48.1 so if your client is insisting on exactlyh 48.1 it'll be impossible to achieve that to the nearest 10th of MB and you may need to vary the quality, yourself, starting at 100, and going down by 10 until you find which range 48.1 is in, then incrementing the quality back up by 1 point until you get close to 48.1 MB on disk.

This process would need to be repeated for each photo you export because the filesize on disk varies compared to the amount of image detail or not (grass vs trees) or in-focus vs out-of-focus, so it'll take a long time and you'll never get to exactly 48.1MB, I doubt.

In your discussions with the client about MP vs MB indicate that the highest quality photo for them is native pixel dimensions (no resizing on Export) and Quality of 100, which will likely be less than either 48.1MB or 48.1MP given that your camera sensor is only 15 megapixels.

If your client is asking for unresized photos of 48.1MP, then you'll need a medium-format sensor camera that costs 10s of 1000s of dollars to buy and probably quite a bit to rent and whose output may not be compatible with LR, at least until Canon releases their 52MP DSLR later this year.

Photo of Hans Mitterer

Hans Mitterer

  • 3 Posts
  • 0 Reply Likes
Pls. excuse my confusion in technical terms and thank you very much for your elaborate answer.

The task is to export pictures at a minimum of 16 MP, being min. 48,1 MB large.
It's just for general rating reasons as I ́m told.

So I guess I ́ll work my way around enlarge the files for a minimum of 16 MP/48,1MB size following you description. If there is no other option as I understand.