17 Replies Latest reply on Feb 26, 2012 1:43 PM by Jeff Arola

    image layer edge snapping failure

    pcmanpcman Level 1

      Hi

       

      ok here is the story

      i open an image to photoshop cs5 and it opens as a background layer, right?

      now i drag n drop from windows exporer the same image over the cs5 on top opening as a new layer.

       

      It shows up an X over the image where you can reposition the second image (layer) over the first.

       

      i don't want to reposition, its the same image, i want the pixels of the second layer to match EXACTLY the first layer.

      i press the TICK button or ENTER where the new layer gets the images name

      BUT when i zoom in 1600% or 3200% and move to the edge i see the edges of the new layer not positioned exactly over the 1st layer.

       

      it positions the new layer 1 or 2 pixels to the right and some times 1 or 2 pixels to the bottom.

      it doesn't snap the edge.

       

      i know i can fix it afterwards by align the layers from the layer -> align menu

      but its annoying, even creating an action..

       

      is there a setting in the prefrences which i'm missing?

      is it a bug? if so, can this be fixed in CS6?

       

      thank you

        • 1. Re: image layer edge snapping failure
          Noel Carboni Level 8

          I've seen this as well.  I think it's a bug.

           

          If you stack multiple images all the layers will line up with one another.

           

          -Noel

          • 2. Re: image layer edge snapping failure
            Noel Carboni Level 8

            I meant to say, all the layers will line up with one another but be off from the background.

             

            -Noel

            • 3. Re: image layer edge snapping failure
              pcmanpcman Level 1

              Hi Noel,

               

              the only way to fix this is this by using an action which steps are these:

               

              select the new layer by ctrl + a

              and then go to layer menu -> align layers to selection -> vertical centers

              and then once again, layer -> align layers to selection -> horizontal centers

               

              works perfectly where the images size are exactly the same!

              very helpful for DRI and custom HDR post processing.

               

              I don't understand why it can't be done like this in the first place. its stupid..

              i've checked out the prefrences but i didn't find an option fixing this, so i'm reporting it.

               

              Regards

              • 4. Re: image layer edge snapping failure
                Bo LeBeau Level 4

                pcmanpcman wrote:

                i open an image to photoshop cs5 and it opens as a background layer, right?

                now i drag n drop from windows exporer the same image over the cs5 on top opening as a new layer.

                 

                So you want a document that has the exact same image on two layers? Is that correct?
                If so, you are making this too difficult. You can duplicate the background layer by 1 of 3 different methods:

                • Dragging the background layer to the New Layer icon at the bottom of the Layers panel
                • Click the background layer and select Duplicate Layer from the pull down menu at the upper right of the Layers panel
                • Click the background layer and select Duplicate Layer from the Layer menu at the top of the screen.
                • 5. Re: image layer edge snapping failure
                  Noel Carboni Level 8

                  Bo, the same problem can occur if you bring in several different images that are registered to one another down to the pixel.  I had this happen once when I was doing a series of screen grabs of a window and was preparing to animate them via a GIF.  The problem is that the placed image is off to the bottom-right by one pixel.  Note the offset showing in this screen grab, after placing an identically registered image over a background, then hiding the background.

                   

                  PlaceError.jpg

                   

                  Another way to accomplish getting a bunch of images in separate layers is File - Scripts - Load Files into Stack.

                   

                  -Noel

                  • 6. Re: image layer edge snapping failure
                    Jeff Arola Adobe Community Professional

                    Your creating a smart object when you drag the new file from windows explorer into the existing document?

                     

                    Try doing a select all before dragging from explorer into the file.

                     

                    Also try turning off Preferences>General>Place or Drag Raster Images as Smart Objects and see if that makes a difference.

                    To see if the layers are aligned, zoom the image to 100% and use the difference blending mode. If there aligned then the document will be solid black.

                    1 person found this helpful
                    • 7. Re: image layer edge snapping failure
                      pcmanpcman Level 1

                      Hi Bo,

                      thanks for your reply.

                       

                      Bo i mentioned the same image as an example, meaning that i bring an image with same dimension sizes.

                      If i wanted to duplicate the background layer i would simply press the ctrl + j shortcut

                       

                      Noel shows exactly whats happening

                       

                      The actual reason is that i open the same RAW image with different exposures and color values as different layers and play a bit with masks and selective color to keep all the pixel information available in order to create a perfect DRI image.

                      In order to do that, all the layers that come from the same image must be perfectly aligned.

                       

                      Regards

                      • 8. Re: image layer edge snapping failure
                        Noel Carboni Level 8

                        If your intent is to align multiple exposures, which may be slightly misaligned due to camera motion, note that the Load Files into Stack feature I mentioned above has an "auto align" option.

                         

                        And there's the possibility of using Edit - Auto Align Layers as well.

                         

                        -Noel

                        • 9. Re: image layer edge snapping failure
                          pcmanpcman Level 1

                          i don't wanna do that.

                          i'll have to export several images from the same RAW before i load them into stack,

                          while opening the same RAW with different values on exposure comes quite handy!

                          • 10. Re: image layer edge snapping failure
                            pcmanpcman Level 1

                            Hi Kelly

                             

                            well your method seems to work!

                             

                            i've disabled everything that has to do with the smart objects since i don't use smart objects.

                             

                            Selecting the background layer by pressing CTRL + A and insterting afterwards the image from windows explorer it snaps the edges perfectly!!

                            i've tried it a couple of times, it works..

                            • 11. Re: image layer edge snapping failure
                              Jeff Arola Adobe Community Professional

                              If you turn off the preference that i mentioned, then you shouldn't have to do a select all, but if you want a smart object then doing a select all is one way to ensure the alignment.

                              It seems this may have something to do with the video card, as some of our windows systems exhibit this behavior and some don't. The only major difference in the systems being the video card.

                              (that and we switched out the video card on one of the systems to a known good one and problem went away)

                              • 12. Re: image layer edge snapping failure
                                Noel Carboni Level 8

                                That sounds about right, R_Kelly.

                                 

                                Surprisingly, achieving exact pixel alignment in OpenGL is quite a challenge.  Consider that most coordinates are managed in floating point and also that there's no one standard that defines whether a pixel's coordinate refers to a corner or its center, and you begin to understand...  That said, there are some tried and true techniques that may not be universally employed - such as the suggestion to add a fixed 0.375 pixel offset to all coordinates provided to OpenGL.

                                 

                                Plus, how things align are sometimes seen to actually change between driver releases!

                                 

                                It's pretty easy to spot disparities in the pixel alignment of the selection marquee, for example.

                                 

                                 

                                 

                                -Noel

                                • 13. Re: image layer edge snapping failure
                                  pcmanpcman Level 1

                                  Place or Drag Raster Images as Smart Objects DISABLED

                                  still doesn't work

                                  the only way is select all and then drag n drop

                                   

                                  my graphic card is nvidia 9600GT

                                  • 14. Re: image layer edge snapping failure
                                    Trevor.Dennis Adobe Community Professional

                                    Try this:

                                     

                                    • Open the image, and Ctrl 0 to fit screen
                                    • Drag same image over and hold down Shift key to force it to drop in the center.
                                    • Right glick the resulting Smart object and choos Place

                                     

                                    When I choose Place I can see the second layer move a tiny bit.

                                     

                                    • Use Ctrl z to undo that move, and it nudges back to the center.

                                     

                                    As always, temporarily making the upper layer's blend mode Difference will check alignment.  I usually Lock the position of a moved layer when I have it in the right place.

                                    1 person found this helpful
                                    • 15. Re: image layer edge snapping failure
                                      pcmanpcman Level 1

                                      Hi Dennis, thanks for replying.

                                       

                                      CTRL 0 drag n drop works also even without shift n draging.

                                      I believe the whole mixup has to do with the zoom scale.

                                       

                                      draging to the center with shift also works in either zoom scale.

                                      • 16. Re: image layer edge snapping failure
                                        Trevor.Dennis Adobe Community Professional

                                        Yes, but it was _Placing_ the Smart object layer that caused it to move a couple of pixels.  'Ctrl z'  straigt after caused it to go back to the center and perfect alignment.

                                        • 17. Re: image layer edge snapping failure
                                          Jeff Arola Adobe Community Professional

                                          That's a good tip as it seems to work here to.

                                          (using fit to screen before placing or drag and drop an image from outside of photoshop of the same size )