LR 4.1: Allow relative (%) height/width on export

  • 2
  • Idea
  • Updated 8 years ago
Merged

This conversation has been merged. Please reference the main conversation: I wish Lightroom had the ability to export images by percentage size

During export, why prevent the use of relative dimensions for the export size?
To date, Lightroom 4.1 offers to resize-on-export with absolute dimensions given in inches, cm, pixel, megapixels or whatever.

Still I couldn't find a way to resize it to 50% in each h/v dimension (that is: 50% width and 50% height, implying a 75% reduction in pixel count).
Or even worse, couldn't find a to specify for example a reduction of 50% in pixel count (effectively resizing by about 70% in each h/v dimension), without having first to sort my photos grouped by megapixels, then exporting them with ad hoc half-megapixel-count value (rounded to the nearest integer, but hey that's life).

The addition of a feature for relative resizing could prove of some use (e.g. to export images at half-res or quarter-res without the need for a calculator at hand for converting % in mpixel count to px in width/height).

Afaik such a feature already implemented in Adobe Photoshop and other hi-tech imaging software (e.g. MS Paint in Windows). I bet the math behind such a resizing feature is not overly difficult - feel free to contact me if you guys at Adobe need some help with the equations, square roots, rounding etc.
Photo of Chris Packrat

Chris Packrat

  • 30 Posts
  • 2 Reply Likes
  • kidding

Posted 8 years ago

  • 2
Photo of Lee Jay

Lee Jay

  • 994 Posts
  • 137 Reply Likes
Why would you need that? That means your final images are going to vary in size based on how you crop them.
Photo of Chris Packrat

Chris Packrat

  • 30 Posts
  • 2 Reply Likes
Why would one need to crop?
Why would over-/subsampling be ever needed?
Why would one want no variation in size ?
So many philosophical questions...
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 392 Reply Likes
Chris,

I get your point, but it may help to present your use case(s) for such a feature.

Adobe leaves stuff out of Lightroom on purpose, to keep it as simple/clean as possible. They also add stuff when it seems appropriate...

Lr/Mogrify supports resize by percent, if you need to do so in the mean time.

Rob
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 392 Reply Likes
Photo of Chris Packrat

Chris Packrat

  • 30 Posts
  • 2 Reply Likes
OK, agreed, if most customers don't need it, that's not worth going through the hassle of offering the option - probably adds too much complexity to the GUI and underlying code... I guess that's today's policy in the software-making industry: if the average customer never uses sth, don't even think about it, even remove it :p

Well, some potential use is when one does not care at all about fitting one's image into a predefined absolute size (1600x1200 screen wallpaper or 5x7" print), but rather want to decrease absolute spatial resolution for inline viewing purposes without sacrificing too much pixel accuracy/sharpness. Hence the need for a subsampling function, not only 'fit in this or that size' function.

Of course one can choose a half-res in-camera (e.g. the "5 mpix size" on a 10mpix digicam) to decimate data at acquisition time, however without much control on the process (and I doubt it's possible to shoot Raw at only half the sensor's resolution to increase later developed Raw apparent sharpness - simply doesn't work that way).

Another instance where I don't care about the final dimensions of an image is when viewed on Flickr (with h/v scrolling at 50% image resolution - that's a 75% waste of memory/bandwidth), or in any viewer looking for specific details in a shot without having to load a 200 MB tiff where a 50MB one does the job. Some images 'look good enough' with a 1:2 subsampling in every direction, without having to load a full-weight full-scale version simply to resize it immediately to 50% or 25%.

Computer science has made much progress in the up- and downsampling algorithms for a variety of purpose (e.g. GIS, scientific imaging) - I'm simply wondering what's the rationale behind Adobe's decision to forbid this kind of operation in Lightroom.

Btw, qualitywise (and CPU-time-wise, and metadata-wise) the 'solutions' at hand by adding a post-processing phase are always risky, add some complexity to the operation and still p*ss off the customer. The least steps the better.

Well, for the time being, I'm down to using a good ol' calculator and a bit of math, or exporting to Ps5, resize there (with a bit of control on the resizing procedure), then save from within Ps, and reimport to LR. So simple.

edit: Rob> thanks a lot for your efforts. :) May I kindly ask how exactly the processing is performed? e.g. does it rely on some 3rd party software PP or is it simply a "graft" on LR's inner workings at export time? (would spare me some reading of the code)
Always glad to have developers ready to compensate for others' laziness/lack of understanding ;)
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 392 Reply Likes
I apologize that I did not read every word, but only skimmed your post. There is a large stack of bugs and omissions in Lightroom. I shan't portend to know the reason this feature is not in Lightroom, but my guess: same reason all the other gobs of stuff aren't, that seem like they should be... - whatever that reason is.

Anyway, ExportPercentResize is a standard simple export filter, otherwise known as a Post-Process Action. Lightroom offers exports up to filters before rendering, this one changes the target dimensions before passing back to Lightroom. I have a plugin generator that will generate a skeletal export filter with a single click. This one took me about 5 minutes to write. - a UI for the percent number, a multiplication of the dimensions, and that's it. One thing: if you were certain to crop to dimensions that are evenly divisible by the resize factor, it may or may not assure resizing by doubling or halfing - dunno how Lightroom will handle it in various cases, but cropping to specific dimensions is another feature on the above mentioned list... (hint: there is a recent post outlining a work-around procedure to do it).

Cheers,
Rob
Photo of Chris Packrat

Chris Packrat

  • 30 Posts
  • 2 Reply Likes
Rob, I can't seem to figure how the linked plugin is supposed to work... Successfully installed, but the entered percentage makes little sense to me ?!
For example entering:
- "25%" results in a downscaling to 16% in horiz/vertical dimension of pixels (= 2% of the pixel count)
- "100%" results in a downscaling to 66% in horiz/vertical dimension of pixels (= 44% of the pixel count).

Entering "50%" I would have expected EITHER a downscaling to 50% in horiz/vert dimension of pixels (=25% of the pixel count; as implemented by the engineers at Microsoft in their MS Paint product) OR a downscaling to 70.7% in horiz/vert dimension of pixels (=50% of the pixel count, that is: cutting the "megapixels" of the shot in half).

I probably missed some detail, though.
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 392 Reply Likes
It's setting the maximum width as a percent of the actual width.
Likewise, it sets the maximum height as a percent of the actual height.
It doesn't compute percent of pixel count (megapixels). Lightroom only allows you to specify a box in which the final picture will need to fit - it always preserves aspect ratio.

I realize now I should have detected the case of megapixels instead of width & height dimensions - next rev.

PS - I never understood the difference between "width & height" and "dimensions" - if you edify me, it may help avoid yet another rev...

R
Photo of Chris Packrat

Chris Packrat

  • 30 Posts
  • 2 Reply Likes
Strangely, it's setting a resulting value depending on what choice I make in the "resize to fit" LR box. The resulting dimension then gets inpredictible on my system.

All I wanted from Adobe engineers was to be able to use "%" as a unit, for instance entering "50" resulting in a 1500x1000 image being reduced to 750x500.

OK, let's forget it, probably not worth or too hard to implement... let's use my favourite calculator and in-the-head rounding to integer :p
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 392 Reply Likes
ExportPercentResize v1.0 only worked for 'Width & Height' and/or 'Dimensions'. v1.1 handles 'Megapixels' too:

http://www.robcole.com/Rob/ProductsAn...

'Long Edge' and/or 'Short Edge' implemented upon request.
Photo of Chris Packrat

Chris Packrat

  • 30 Posts
  • 2 Reply Likes
OK I start to seize the logic behind your plugin. :)
That does not solve my issue (the default "Resize to fit" zone should be completely disabled/ignored/bypassed in any case, without the need for entering any kind of value beside a "Scale" percentage) but I'm sure some users will put it to some use :) Thanks

P.S. As for the differing behaviour between WxH and Dimensions, some clues here: http://www.lightroomqueen.com/downloa...
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 392 Reply Likes
Thanks for the tip about the w&h vs. dims.

Why does this not solve your problem?

Does it not do what you want, or do you take issue with the way you have to do it?

I mean, it'll scale width & height by percentage, or scale megapixels by percentage. What exactly are you wanting to scale by this percentage?

Could you provide an example, like:

Suppose I have two images whose cropped dimensions are... - and a scale factor of ... they would be exported thusly ...

???

Rob
Photo of Chris Packrat

Chris Packrat

  • 30 Posts
  • 2 Reply Likes
Cf. supra :

For example entering:
- "25%" results in a downscaling to 16% in horiz/vertical dimension of pixels (= 2% of the pixel count)
- "100%" results in a downscaling to 66% in horiz/vertical dimension of pixels (= 44% of the pixel count).

Btw I got at least 4 nag boxes when trying to enter any value, is it intended ? ;)

Don't take it personally, but I bet it would be much more simple if Adobe would simply add % as a [relative] length unit.
To understand what's the expected behaviour, fire MS Paint (provided for free with Windows Vista & 7)
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 392 Reply Likes
I'm extremely confused.

|> - "25%" results in a downscaling to 16% in horiz/vertical dimension of pixels (= 2% of the pixel count)
|> - "100%" results in a downscaling to 66% in horiz/vertical dimension of pixels (= 44% of the pixel count).

What???

My test results using ExportPercentResize:

If cropped dimension is 2000 by 1600, and resize type is 'Width & Height' and percent is 50, then the final dimension will be 1000 by 800.

Likewise, for the same picture, whose megapixels would be 3.2, setting resize type to megapixels and percent to 50 will yield an exported image having 1.6 megapixels, and dimensions of appx 1414x1131.

Is that not the results you are getting, or is that not the results you are wanting?

PS - I put the prompts in because I thought you were unsure how it worked and what to expect... I'll probably take them out, once the confusion is resolved.

|> I bet it would be much more simple if Adobe would simply add % as a [relative] length unit.

Adobe has heard you're request. I'm just trying to provide a work-around for the mean time.

Rob
Photo of Chris Packrat

Chris Packrat

  • 30 Posts
  • 2 Reply Likes
Uninstall, reinstall, then 1.1 appears to work as expected & intended (tested both the 'Dimensions' and the 'Megapixels' settings).
Still confused as to how I ended up with the previous results... congrats and thanks

(btw I bet Adobe hasn't heard any request - since it has only 1 vote :p)
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 392 Reply Likes
Glad you got something you can use for the mean time.

PS - This request has been around a few times. Of the umpteen thousand items on the list, Adobe did very few. My guess they are short staffed in a challenging economy and had their hands full with develop changes, map module, books module, crashing, data-loss, and performance bugs, and nuthin' left over for this sort of thing when release pressures began to mount... - but, I could be wrong.

Note: there are plenty of great ideas that never received over a half-dozen votes in their life - some even got implemented. I don't think RGB curves had more than a few votes when it made the cut. Just because Adobe didn't apply a label, doesn't mean they haven't seen it.

Cheers,
Rob