31 Replies Latest reply: Dec 13, 2013 2:24 PM by Matthias Bober RSS

    LR 5 - Image Sizing Dimensions - wrong image size

    Matthias Bober

      Hi,

       

      Image Sizing Dimensions produces wrong image sizes upon export for certain images.

       

      Example, I have export set up for iPad resolution, 2048x1536px at 264ppi. If I now export an 3264x4928px image it should be resized to 1356x2048px. What I get is 1356x2047 instead, one pixel too short on the long side. This doesn't happen for all images source resolutions and ratios though. I haven't figured out the pattern yet.

       

      Here a link to an image which exports at wrong size (export dimension set to 2048x1536px).

       

      http://www.bobtronic.com/files/IMG_0289.JPG

       

      I would appreciate a speedy fix for this problem. Thanks

       

      cheers,

      Matthias

        • 1. Re: LR 5 - Image Sizing Dimensions - wrong image size
          dj_paige Community Member

          2048x1536 is a 4:3 ratio

           

          4928x3264 is not a 4:3 ratio, in fact it is close to (but not exactly) a 3:2 ratio

           

          Thus, when you say that you expect your 4928x3264 to show up as 2048x1356 (is this a typo?), this can't happen as the original is nearly 3:2 and not close to the desired 4:3 ratio.

           

          If you meant that you want your 4928x3264 to show up as 2048x1536 (is this the correction of the typo?), you are expecting a photo that is nearly 3:2 to be exported as 4:3, which can't happen.

           

          So ... the problem is at your end. If you want an export to have a 4:3 ratio, it MUST be first cropped to 4:3, which apparently has not been done.

          • 2. Re: LR 5 - Image Sizing Dimensions - wrong image size
            Matthias Bober Community Member

            No, Image Sizing Dimensions resizes images so they will fit within these set dimension. It's taking the longest edge of the image and sizes it to the longest edge of the set dimension. The original ratio of the image is not changed. Just look up the Lightroom documentation. Furthermore this worked fine up until LR5.

            • 3. Re: LR 5 - Image Sizing Dimensions - wrong image size
              dj_paige Community Member

              Nothing in Image Sizing will change aspect ratio.

               

              All of your examples do not produce a 4:3 aspect ratio because the photo you are starting with (4928x3264) is not 4:3.

              • 4. Re: LR 5 - Image Sizing Dimensions - wrong image size
                Matthias Bober Community Member

                I don't want my image 3:2 image to become 4:3. Please read the docs, Image Sizing Dimension is meant to resize an image to fit within a set dimension. This is hugely useful if you want to resize an image for a given display so it will not be up- or downscaled during display.

                • 5. Re: LR 5 - Image Sizing Dimensions - wrong image size
                  Matthias Bober Community Member

                  Also as mentioned before this worked fine up until LR5.

                  • 6. Re: LR 5 - Image Sizing Dimensions - wrong image size
                    dj_paige Community Member

                    I guess we'll just have to disagree. 

                    I don't want my image 3:2 image to become 4:3.

                    Your initial example (the only one you have presented) does indeed start with a 3:2 image and you are claiming you want it to be 4:3

                    • 7. Re: LR 5 - Image Sizing Dimensions - wrong image size
                      Little_Pale_Face MVP

                      Hi,

                       

                      I'm not a LR expert so I could well be wrong but I have just noticed something in the figures that were originally quoted.

                       

                      If you start off with a 4928 x 3264 image and want to resize it to 1356 on the short side, according to my caluculation the long side would be reduced to 2047.29 [calc short side = 4928 * 1356 / 3264]

                       

                      LR probably can't make up anothe pixel.

                       

                      As far as I thought, the sizes you quote in the eport settings is actually the maximum size and not the absolute size. I believe you can als specify whether to size according to the short or long side.

                       

                      Could this have any bearing on the problem?

                       

                      Brian

                      • 8. Re: LR 5 - Image Sizing Dimensions - wrong image size
                        Matthias Bober Community Member

                        Thank you both for taking the time to answer.

                         

                        Brian is on to something here. It appears that prior to LR5 the longest edge was used to calculate the new short edge. With LR5 it seems the other way around.

                         

                        To make it clear what I'm trying to achieve, I want to resize my images for display on the iPad. Up until LR5 this has worked fine but now I'm one pixel line too short

                         

                        image_fit.jpg

                         

                        3:2 image on the iPad

                         

                        cheers,

                        Matthias

                        • 9. Re: LR 5 - Image Sizing Dimensions - wrong image size
                          elie-d Community Member

                          This an absolute non problem. The answer is to do the processing properly, the way LR is designed to do it. If you want a image that is 1356x2048, which is 1:1.51, create a custom crop with that aspect ratio and crop your master. Then type in one or both of the desired dimensions in the Resize dialog. Granted this will cost you a few more seconds and few more finger flexes, but a problem that is so easily solved is not worth a rant.

                          • 10. Re: LR 5 - Image Sizing Dimensions - wrong image size
                            Matthias Bober Community Member

                            Thanks for the advice but this does not solve the problem.

                             

                            Please let me explain this more detailed. I have an HD publishing service set up to export to an 2048x1536 target (iPad resolution). There I collect all images I want to export for the iPad. The images have different ratios, 3:2, 4:3, 1:1 etc. The publishing service Image Sizing Dimensions are set to 2048x1536. Now up until LR5 after export the images matched always in a way that they didn't had to be scaled on the iPad.

                             

                            Two examples:

                            a 3264x4928 image was resized to 1356x2048, a perfect letterbox fit for the iPad display

                            a 4727x1576 image was resized to 2048x683, again a perfect letterbox fit (btw. this example is actually still working fine in LR5)

                            a 3264x3264 image was resized to 1536x1536, again a perfect fit (and again this example is stillworking fine in LR5)

                             

                            So my conclusion is that there slipped somewhere an error in the resizing calculation in LR5, maybe some precision error but who knows.

                             

                            Btw. the reason why it's a problem is because I now can't trust my publishing export anymore. I have to check each individual image and check the exported resolution. So please don't call this a non-problem

                             

                            cheers,

                            Matthias

                            • 11. Re: LR 5 - Image Sizing Dimensions - wrong image size
                              Matthias Bober Community Member

                              I did some more testing and the same problem occurs with Image Sizing Long Edge.

                               

                              If you are interested you can try for yourself. Create an 3264x4928px image. Set export to Image Sizing Long Edge and 2048px. The exported image has a long edge of 2047px. This is definitely a bug.

                               

                              cheers,

                              Matthias

                              • 12. Re: LR 5 - Image Sizing Dimensions - wrong image size
                                Little_Pale_Face MVP

                                Hi Matthias,

                                 

                                I did a little testing and indeed found that if you specify 2048, you end up with 2047. If you specify 2047 you get 2047 and if you specify 2049 you get 2049.

                                 

                                I also found out that if you reduce the short side of the image by 1 pixel to 3263 x 4928 you get 1356 x 2048

                                 

                                So there must be something slightly odd about your original aspect ratio that causes the problem. I suspect rounding down in the calculation somewhere.

                                 

                                I'm not really sure whether the missing pixel would cause a problem on the ipad since it would be about .004 inch - but then my eyes are getting old.

                                 

                                Brian

                                • 13. Re: LR 5 - Image Sizing Dimensions - wrong image size
                                  Matthias Bober Community Member

                                  Thanks for checking. There is something strange going on, as mentioned it worked fine in previous LR versions. What is really annoying to me is that this happens at my camera's native resolution and often you just need pixel-perferct results, think of creating websites etc.

                                   

                                  cheers,

                                  Matthias

                                  • 14. Re: LR 5 - Image Sizing Dimensions - wrong image size
                                    trshaner MVP

                                    It works fine in LR4.4.1 and Photoshop CS6.

                                     

                                    4928x3264 Export Resize Long Edge 2048 outputs a 2048x1356 file.

                                     

                                    I suggest reporting this at the Bug Reporting site under 'Report a problem:'

                                     

                                    http://feedback.photoshop.com/photoshop_family

                                     

                                    LR4.4.1 Results

                                    3264x4928 Export Long Edge 2048.jpg

                                    • 15. Re: LR 5 - Image Sizing Dimensions - wrong image size
                                      trshaner MVP

                                      Looks like Rob Cole already reported this issue with LR5 a month ago. I suggest adding your +1 vote and comments since Adobe still has not 'Acknowledged this as a problem:

                                       

                                      http://feedback.photoshop.com/photoshop_family/topics/lightroom_5_export_isnt_resizing_exa ctly_to_specified_long_edge

                                      • 16. Re: LR 5 - Image Sizing Dimensions - wrong image size
                                        Matthias Bober Community Member

                                        Thank you for the confirmation. I added my vote to the bug report thread.

                                         

                                        cheers,

                                        Matthias

                                        • 17. Re: LR 5 - Image Sizing Dimensions - wrong image size
                                          Bert Nase Community Member

                                          That's definately a problem of missing quality assurance at the developing department. In a normal software development company there exist test cases that need to be run through bevor releasing a software. Adobe releases a "release candidate" and let the users do the testing. Unbelivable.

                                           

                                          I call this banana software. It mellows at the customer!

                                          • 18. Re: LR 5 - Image Sizing Dimensions - wrong image size
                                            areohbee Community Member

                                            It seems this issue was fixed in Lr5.2 (final release). Does anybody have reason to belief this issue is not so fixed in all cases, when using the final release of Lr5.2 I mean?

                                            • 19. Re: LR 5 - Image Sizing Dimensions - wrong image size
                                              Matthias Bober Community Member

                                              Unfortunatly Dimension resizing still exhibits the "one pixel too short" problem. Long Edge resizing on the other hand works fine now.

                                              • 20. Re: LR 5 - Image Sizing Dimensions - wrong image size
                                                areohbee Community Member

                                                Bert Nase wrote:

                                                 

                                                That's definately a problem of missing quality assurance at the developing department.

                                                This problem was reported by the quality assurance department (users) before the product was released. You want my theory? - there's a bug in the bug fixing department...

                                                • 21. Re: LR 5 - Image Sizing Dimensions - wrong image size
                                                  areohbee Community Member

                                                  Matthias Bober wrote:

                                                   

                                                  Unfortunatly Dimension resizing still exhibits the "one pixel too short" problem. Long Edge resizing on the other hand works fine now.

                                                  I can't reproduce this problem. If I could reproduce it, then I may be able to add a fix to Exportant plugin so people don't have to change their export presets.

                                                   

                                                  Would somebody please post an image which when exported exhibits the malady, together with a sample export preset or at least the critical settings. - thanks.

                                                   

                                                  R

                                                  • 22. Re: LR 5 - Image Sizing Dimensions - wrong image size
                                                    Matthias Bober Community Member

                                                    Hi Rob,

                                                     

                                                    Thanks for checking, please download following export preset and test image.

                                                     

                                                    http://bobtronic.com/files/2048x1536.lrtemplate

                                                    http://bobtronic.com/files/test.tif

                                                     

                                                    The image has a resolution of 3264x4928. Exporting using Dimension resizing of 2048x1536 results in an 2047x1536 image.

                                                     

                                                    cheers,

                                                    Matthias

                                                    • 23. Re: LR 5 - Image Sizing Dimensions - wrong image size
                                                      areohbee Community Member

                                                      Thanks Matthias,

                                                       

                                                      Exportant v1.16+ should fix y'all right up :

                                                      exportant_prevent_short_dimensions.gif

                                                      Please let me know if there are any cases that aren't properly corrected by this option - thanks.

                                                       

                                                      Rob

                                                      • 24. Re: LR 5 - Image Sizing Dimensions - wrong image size
                                                        richardplondon Community Member

                                                         

                                                        The image has a resolution of 3264x4928. Exporting using Dimension resizing of 2048x1536 results in an 2047x1536 image.

                                                        The scaling factor 4928 down to 2048, is 0.4155844155844156...

                                                         

                                                        Assuming that LR is working to only 3 decimal places here, which indications discussed in another thread would suggest, then there are several ways to achieve that:

                                                         

                                                        • truncate down to 0.415 by discarding the subsequent digits
                                                        • "quick-rounding" of the third digit by inspecting the fourth-place digit only, and incrementing the third-place digit when the fourth-place digit is larger than 5, which it is not in this case, resulting in 0.415
                                                        • "math-rounding" by inspecting all of the following digit pairs in turn, until you reach a pair that is lower than 50, and then working back again to simplify. This procedure rounds 0.41558 up to 0.4156, then after doing that, rounds 0,4156 up to 0.416

                                                         

                                                        Speculation: the difference between 0.415 and 0.416, is the difference between a result with 2047, and one with 2048, when executed.

                                                         

                                                        Most of the time the "quick-round" procedure will work out fine, also truncating will usually be good enough, assuming the above has anything to do with the reality (which it may not). Just occasionally, though, there'll be an error in the final digit, compared with what the theoretically accurate procedure would have given. So if I am right this is not strictly speaking a bug (something failing to execute as it has been designed to do), but the result of a software design choice. "Works as designed", iow .

                                                         

                                                        It seems that LR, perhaps differently between versions, is working this through by simple calculation (from the front-end), without comparing the back-end outcome against what you have requested. How much this (intermittent) issue actually matters, is a question of judgement, and of particular requirement.

                                                         

                                                        [ alternative method: I find the Print module, outputting to JPG, is completely reliable when it comes to making a standardised JPG as to the dimensions, as well as offering some different technical and design options, than what you get with Export. For one thing, you get the option of on-the-fly cropping to shape, which you can then adjust interactively where (as here) the image is a different aspect than the Retina display. So if you want it, you can fill the screen instead of getting letterbox, all without having altered your main (Develop) crop for that image. Alternatively, if you don't want the Zoom to Fill option (e.g. with landscape images to be shown in portrait orientation as part of a sequence) you can still make all your images to the same dimension, but controlling the appearance of the borders that are left (which become part of the image) ]

                                                         

                                                        RP

                                                         

                                                        ps: AFAICT one would expect simple truncation to produce the appropriate answer half of the time; one would expect simple rounding to just one further digit, to be wrong half of the times when the following digit happened to be 5 - or to put in another way, to be right in 95% of cases; and proper rounding, examinng as many places as it takes, to be right 100% (within precision limits).

                                                        • 25. Re: LR 5 - Image Sizing Dimensions - wrong image size
                                                          Matthias Bober Community Member

                                                          Thanks Richard, what baffles me is that up to LR4.3 it was working perfect. Something must have changed in the resizing code in LR5.

                                                          • 26. Re: LR 5 - Image Sizing Dimensions - wrong image size
                                                            areohbee Community Member

                                                            Matthias Bober wrote:

                                                             

                                                            Something must have changed

                                                            Yeah, they broke it. Which would be just fine with me (we all make mistakes) if they just fixed it in the next dot rev. Dunno why it takes 'em months or years to fix things that seem like they should only take days or weeks.

                                                             

                                                            Reminder: Exportant will fix the problem. If you don't like using plugins, then you can fix the problem without a plugin by manually editing your export preset files and adding a decimal fudge factor to the width/height values.

                                                             

                                                            Rob

                                                            • 27. Re: LR 5 - Image Sizing Dimensions - wrong image size
                                                              Matthias Bober Community Member

                                                              Rob, problem is I use Publishing Services and not the Exporter, so I can't make use of the Export presets.

                                                               

                                                              Anyways I hope this issue will be fixed within the LR5.x release cycle.

                                                               

                                                              cheers,

                                                              Matthias

                                                              • 28. Re: LR 5 - Image Sizing Dimensions - wrong image size
                                                                areohbee Community Member

                                                                Hi Matthhias,

                                                                 

                                                                This problem was reported several months ago during Lr5 beta, and @Lr5.2 is still is not fixed.

                                                                 

                                                                To be clear: Exportant can be used with publishing services, and will solve the problem immediately.

                                                                 

                                                                Obviously it's your call, but I wouldn't wait on Adobe if it really matters to you..

                                                                 

                                                                UPDATE:

                                                                -----------

                                                                If you are a plugin avoider, you can fix manually by:

                                                                * Exiting Lightroom.

                                                                * Loading preferences into text editor.

                                                                * Changing AgPublish_size_maxWidth and AgPublish_size_maxHeight values in your publish service settings (e.g. add .1).

                                                                * Restart Lightroom.

                                                                (You may need to back those changes out if/when problem fixed by Adobe, but you may not).

                                                                -----------

                                                                 

                                                                ~R.

                                                                 

                                                                Message was UPDATED by: Rob Cole

                                                                • 29. Re: LR 5 - Image Sizing Dimensions - wrong image size
                                                                  vinsolo Community Member

                                                                  richard,

                                                                   

                                                                  that was a masterfull explanation of basic rounding - I knew quite a bit less about the subject before this and am fortunate to have been able to read your message.

                                                                   

                                                                  thanks,

                                                                  vince

                                                                   

                                                                  corrected typo

                                                                   

                                                                  Message was edited by: vinsolo

                                                                  • 30. Re: LR 5 - Image Sizing Dimensions - wrong image size
                                                                    richardplondon Community Member

                                                                    not very "masterful" considering it's wrong - it should not be "until you reach a number pair less than 50, but, "until you reach a single digit that isn't 5". The chances of even needing to go to these further decimal places are increasingly remote - 10% of 10% of 10% etc  - and, in any case, whether LR does then round this third decimal place or not, will only make any practical difference to the result, in certain borderline cases. And the smaller your output dimensions, the rarer such borderline cases will be.

                                                                     

                                                                    Personally, I am typically either making quite reduced standard output for web etc - 1680 x 1200 at most - or else just exporting at original resolution, where the actual pixel numbers are mere accidents arising from the LR crop.

                                                                     

                                                                    In this context, LR's precision is of no concern whatsoever.

                                                                     

                                                                    Even if I did get 1679 instead of 1680 ... which I don't recall ever noticing BTW... real-world evaluation: 'no biggie'.

                                                                    • 31. Re: LR 5 - Image Sizing Dimensions - wrong image size
                                                                      Matthias Bober Community Member

                                                                      I can confirm the fix for LR 5.3. The fix has not been mentioned in Adobe's bugfix list though. Anyways I'm happy it's working fine again. Thanks!