32 Replies Latest reply: Nov 24, 2012 3:29 PM by 222design RSS

    Error in resizing

    222design

      I've found that photoshop is distorting the image when resizing. If you have an image and you duplicate the layer, then with the bottom layer set its size (by free transform) to 99% (width and height), then set the top layers opacity to 50%, the image should be evenly blurred but it's not. It is in focus in the middle and blurred around the edges. Does anybody know why this is happening?

       

      222design

        • 1. Re: Error in resizing
          Mylenium CommunityMVP

          Have you actually verified this by creating a difference image? Viewed at 100% zoom and resolution? I think you are merely mistaking some oddities with PS internal tiling system. At certain zoom levels they sometimes do not align perfectly and produce a visible pattern and likewise, some of the tiles may appear less pristine than others. None of that will/ should occur at 100% view. The only other possible influence would be graphics card issues/ limitations where lower res tiles are used to save resources...

           

          Mylenium

          • 2. Re: Error in resizing
            222design Community Member

            yes, this does happen at 100% zoom. Photoshop is distorting the image when it is resizing it.

            • 3. Re: Error in resizing
              JJMack CommunityMVP

              222design wrote:

               

              I've found that photoshop is distorting the image when resizing. If you have an image and you duplicate the layer, then with the bottom layer set its size (by free transform) to 99% (width and height), then set the top layers opacity to 50%, the image should be evenly blurred but it's not. It is in focus in the middle and blurred around the edges. Does anybody know why this is happening?

               

              222design

              No it should not be blurred evenly.  Visulize it this way when transform 99% width and 99% height and anchor point center. the center pixel will not move in other the just resize in where outter pixels will be moved in as will as resized. Center will not blur much outer will. A linner blur from the center.

              • 4. Re: Error in resizing
                222design Community Member

                It should be blurred evenly. The area that the pixel covers should have an equal offset whether it is in the centre or on the outside.

                • 5. Re: Error in resizing
                  conroy Community Member

                  Two months ago, you posted the same thing and it was explained then that the result of the resizing is as should be expected and is correct.

                   

                  http://forums.adobe.com/message/4787168#4787168

                  • 6. Re: Error in resizing
                    conroy Community Member

                    The following was posted last time you reported the same non-error...

                     

                    If you look at the 99% size image in isolation, you'll see that it has uniformly distributed slight blurring due to resampling.

                     

                    When it's overlaid at 50% opacity on the original (or vice versa), you are seeing an additional blur due to features in the two images being offset. Obviously, the offset, and therefore its blurring effect, linearly increases from zero pixels at the centre to several pixels (depending on image size) at each corner.

                     

                    Here's a 100% size original followed by the original overlaid with a 90% reduced duplicate at 50% opacity. You see the offset increasing as the distance from the centre increases.

                     

                    Screen shot 2012-10-19 at 20.32.59.png

                     

                    Screen shot 2012-10-19 at 20.33.05.png

                    • 7. Re: Error in resizing
                      222design Community Member

                      Yes but this is incorrect. When you change the layer size to 99% it resamples the image producing a different grid of area covered by a pixel. It doesn't matter whether the pixel is at the centre or the edge the offset will be the same, so the image should be evenly blurred.

                      • 8. Re: Error in resizing
                        JJMack CommunityMVP

                        222design wrote:

                         

                        It should be blurred evenly. The area that the pixel covers should have an equal offset whether it is in the centre or on the outside.

                        Lets try again.  Try this approach. start by not moving any pixel center and resize every pixel to 99% of its size. You wind up with an image with gaps between pixels. 

                         

                        Now lets eliminate these gaps.  Start from the center. Move the pixels around the center pixel in one gap distance. next move out and move the surrounding pixels in two gaps repeat move in three gaps etc...

                         

                        This is how Image size works when RESAMPLE is not checked and you increase the image's DPI resolution.  Print pixels are smaller the number of pixels remain the same and the print size is reduced in size.  The higher resolution increases the image sharpness.

                        • 9. Re: Error in resizing
                          Mylenium CommunityMVP

                          It doesn't matter whether the pixel is at the centre or the edge the offset will be the same,

                           

                          No, it won't. Scaling is not a linear operation. The discrepancies in resampling increase the farther away a pixel is from the transform pivot and at large settings, this will cause notable visual degeneration. It should, however, not result in extreme blurriness with normal scaling operations like upsizing by 150% or scaling down to 99%.

                           

                          Mylenium

                          • 10. Re: Error in resizing
                            JJMack CommunityMVP

                            Scaling an Image width and height by the same percentage should be liner be it done by changing pixel size or interpolating the number of pixels in the image.  When resampling an image's image quality will suffer for the new pixels are computer generated using some interpolation method. Not captured with optics and a sensor.  Pixel quality of a resampled image will not be as good as the pixel quality of the original image.

                            • 11. Re: Error in resizing
                              222design Community Member

                              the result is independent of type of sampling. when you decrease the size of the bottom layer it recalculates the area covered by a pixel (the pixel being the same size), it increases the area of image covered by a pixel. this is independent of position of pixel, it is linear, and the difference in area covered (with respect to the top layer) is the same for every pixel, so the image should be evenly blurred.

                               

                              222design

                              • 12. Re: Error in resizing
                                conroy Community Member

                                222design wrote:

                                 

                                Yes but this is incorrect. When you change the layer size to 99% it resamples the image producing a different grid of area covered by a pixel. It doesn't matter whether the pixel is at the centre or the edge the offset will be the same, so the image should be evenly blurred.

                                 

                                Your thinking is incorrect.

                                 

                                The offset must increase as the distance from the scaling origin is increased. There is no possible other outcome. The blur therefore will increase with distance from point of alignment of the stacked images.

                                 

                                Consider the scaling in one dimension to simplify matters.

                                 

                                Here's an original row of squares and a copy at 100% scale.

                                 

                                100 percent.png

                                 

                                Now the copy row has been scaled to 99%. See the offset increase from left to right.

                                 

                                99 percent.png

                                 

                                Finally, when overlaid, there is the explanation for the blur not being contant across your stacked layers.

                                 

                                overlaid.png

                                • 13. Re: Error in resizing
                                  222design Community Member

                                  yes but your images are demonstating the error. The images are incorrect, there should be an even offset. the images have the error in it.

                                  • 14. Re: Error in resizing
                                    conroy Community Member

                                    The images are demonstrating what you saw in your own stacked image, yes, but there is no error. You'll help your argument that there is an error in Photoshop's scaling if you post an example of "correct" scaling which conflicts with Photoshop's scaling.

                                    • 15. Re: Error in resizing
                                      222design Community Member

                                      how can I post an example of correct scaling with photoshop when photoshop has the scaling error in it? There is an error in your images as they are done with photoshop and photoshop has this error in it.

                                      • 16. Re: Error in resizing
                                        conroy Community Member

                                        222design wrote:

                                         

                                        how can I post an example of correct scaling with photoshop when photoshop has the scaling error in it?

                                         

                                        You make a mock-up of the result which you consider correct.

                                         

                                         

                                        There is an error in your images as they are done with photoshop and photoshop has this error in it.

                                         

                                        You have yet to demonstrate that.

                                        • 17. Re: Error in resizing
                                          222design Community Member

                                          this assumes I know how to correct the error which I don't. This is what I really want to know, how to correct this error.

                                          • 18. Re: Error in resizing
                                            conroy Community Member

                                            You surely know your own expectation of my row of squares when resized to 99%. That can't be difficult to illustrate.

                                            • 19. Re: Error in resizing
                                              222design Community Member

                                              ok, if you can't help me never mind. Thankyou for the replies.

                                              • 20. Re: Error in resizing
                                                emil emil Community Member

                                                conroy wrote:

                                                 

                                                You surely know your own expectation of my row of squares when resized to 99%. That can't be difficult to illustrate.

                                                Ok, I'll illustrate what 222design expects

                                                 

                                                the black lines represent the pixel grid in Photoshop. The blue squares fitting in each pixel represents the pixels of the original image. The small red squares is 222design's expectation of scaled image that will produce an even blur.

                                                 

                                                Untitled-8.jpg

                                                 

                                                @ 222design, the problem with your expectation is that it is not possible for a pixel to be smaller than a cell of the pixel grid, and as explained many times before there will be always one center of scale for all pixels. It is not possible to scale each pixel individually from its own center.

                                                 

                                                so, the following statement is incorrect:

                                                222design wrote:

                                                 

                                                ....When you change the layer size to 99% it resamples the image producing a different grid of area covered by a pixel. ..

                                                the pixel grid never changes, it is absolute.

                                                • 21. Re: Error in resizing
                                                  222design Community Member

                                                  yes I know that the pixel grid never changes and as I have stated what does change is the area covered by the pixel and this should be a constant offset giving a constant blur. But all this is going nowhere, thankyou for the repies goodbye.

                                                  • 22. Re: Error in resizing
                                                    emil emil Community Member

                                                    222design wrote:

                                                     

                                                    yes I know that the pixel grid never changes and as I have stated what does change is the area covered by the pixel and this should be a constant offset giving a constant blur....

                                                    And because the grid never changes but only the area covered by the scaled pixels, the only possible ways for this to happen are illustrated on the images below. The blue pixels show where the burring will occur and cannot be the same for all pixels.

                                                    Untitled-8.jpg

                                                    • 23. Re: Error in resizing
                                                      Chris Cox Adobe Employee

                                                      >> this is independent of position of pixel, it is linear

                                                       

                                                      That is the part you keep getting wrong.

                                                      The scaling is very much DEPENDENT on the position of the pixel.

                                                      • 24. Re: Error in resizing
                                                        Chris Cox Adobe Employee

                                                        >> this should be a constant offset

                                                         

                                                        No, that would be the effect if you offset your layer by a fraction of a pixel.

                                                        Scaling will result in a linear change xNew = offset + scale * xOld

                                                        So pixels near the center will have smaller offsets, and those near the edge have larger offsets.

                                                        • 25. Re: Error in resizing
                                                          222design Community Member

                                                          no, when the layer is resampled the larger area results from all four sides of the pixel and this offset is the same whether the pixel is at the centre or at the edge, the resampling is linear.

                                                          • 26. Re: Error in resizing
                                                            Chris Cox Adobe Employee

                                                            Um, no. That is not how it works.

                                                            Please try the examples given, or try it on some graph paper.

                                                            It cannot be uniform because you are working on a fixed grid.

                                                            • 27. Re: Error in resizing
                                                              222design Community Member

                                                              the resampling is the same at the edges and at the centre it is linear or uniform so it should be constantly blurred.

                                                              • 28. Re: Error in resizing
                                                                conroy Community Member

                                                                222design wrote:

                                                                 

                                                                the resampling is the same at the edges and at the centre it is linear or uniform so it should be constantly blurred.

                                                                 

                                                                 

                                                                There are two sources of blur in your example of an overlaid image of different scale and 50% opacity. Maybe you missed me telling you that last month and earlier today:

                                                                 

                                                                "If you look at the 99% size image in isolation, you'll see that it has uniformly distributed slight blurring due to resampling.

                                                                 

                                                                When it's overlaid at 50% opacity on the original (or vice versa), you are seeing an additional blur due to features in the two images being offset. Obviously, the offset, and therefore its blurring effect, linearly increases from zero pixels at the centre to several pixels (depending on image size) at each corner."

                                                                • 29. Re: Error in resizing
                                                                  222design Community Member

                                                                  but the resampling to 99% is linear, it does not matter whether it is an outer or inner pixel, so the offset is constant, so it should be uniformly blurred.

                                                                  • 30. Re: Error in resizing
                                                                    conroy Community Member

                                                                    222design wrote:

                                                                     

                                                                    but the resampling to 99% is linear, it does not matter whether it is an outer or inner pixel, so the offset is constant, so it should be uniformly blurred.

                                                                     

                                                                    The main blur that you are seeing, the one that increases toward the outside of the image, is not a resampling blur, though. It is a perceptual blur due to offset of features in the differently scaled stacked images. Even if the images were composed of an infinite number of infinitely small pixels and the resized one had no resampling blur, the offset due to scaling would still result in you perceiving a blur that increases from zero at the centre to maximum at the corners.

                                                                    • 31. Re: Error in resizing
                                                                      Chris Cox Adobe Employee

                                                                      PLEASE go try this on graph paper.

                                                                      It is linear, so you will NOT get uniform blurring/antialiasing on a finite grid.

                                                                      • 32. Re: Error in resizing
                                                                        222design Community Member

                                                                        I'm drunk now so I'll have to answer your questions in the morning. cheers.