Photoshop Bug: Aligning guides to the Pixel Grid

I had trouble getting designs pixel perfect in Photoshop for a while, particularly when adapting someone else’s document.

I found that whilst zoomed in to pixel-level, my cursor wouldn’t line up with the ruler, and I couldn’t move the ruler origin accurately.  After a while, the solution presented itself… I wasn’t the only one fooled!

I reckon that the PS behavior has changed, and I’ve put tips for using the ruler and origin in ta new post: Aligning guides to the pixel-grid.

Shows ruler origin bug in photoshop Shows Photoshop Ruler Bug
  • In the first screenshot, I set the ruler origin to the intersection of the guides, then am repeating the process as i take the screenshot.
  • In the second, I am hovering so that the dotted indicators in the ruler itself align with the guide… They should track the cursor arrowhead.

Please note that as i took the screenshot, I am zoomed in to max and snap is set to all: the ruler is clearly out of alignment with the pixel grid!  To clarify: I have not been able to accurately set the ruler origin to the intersection of my guides.  Period!

A proposed solution

It has been suggested that fixing other glitches with the Photoshop ruler can be accomplished by:

  • Setting the grid interval to 1px (Preferences > Guides, Grid, etc)
  • Setting View > Snap To: Grid

But unfortunately, that doesn’t work for me.

This issue seems related to the Shape Tool Anti-Aliasing bug, in so far as it relates to glitches with the ruler.

“When the PS is freshly installed and you switch on grid (set to 1px) and rulers and zoom to max, you can see that when moving the canvas left or right that the grid doesn’t match the rulers even though they are both set to ONE PX. They diverge…” Joey33

I mention that issue, as the links above are the only leads I could find which were even vaguely relevant.

I am using CS3 10.0.1 on Mac, but I do remember being bothered by this long ago, certainly well prior to the release of CS3.

So, this post is a cry for help: I’ve trawled the Adobe support forums, Googled, and checked Sitepoint forums, and am stumpled.  If anyone has a solution, I’m all ears!

Update and Solution..

Well..I’m now using CS4, and can’t replicate those screen shots above, so I reckon something was amiss…

I’ve moved the solution to its own post because the normal behaviour is really straight forward, and I’ve thrown in some tips that I’ve discovered along the way.

You can read more at: Aligning guides to the pixel-grid.

I’m not sure if when I posted the solution at last update I had upgraded to CS4 or not.. Meaning: I’m not sure if this solution will work for CS3.

After SirReddSir’s comment, I had another look at this and found that the grid must be visible for snap-to-grid to function.  So basic!  This seems consistent with other functionality in Photoshop: A layer will not snap to another layer (or a guide) of that object is not visible.  That was a very persistent gotch for me!

My lesson:

  • go into Preferences > Guides, Grids & Slices, and set gridline every 10px, and 10 subdivisions
  • setup the document with grid visible,
  • position my guides, (optionally lock them)
  • then I can hide the grid, and work to the guides alone

Okay.. I can finally lay this topic to rest!  Thanks all.

  • SirReddSir

    I’m glad to know that I’m not the only one with this problem. It’s very annoying. Please let me know if you find a solution.

  • http://www.memelab.com.au tim

    Hi SirReddSir! Thanks for the comment.. well.. I’ve just had a look at this with fresh eyes, and found a solution!

    Photoshop won’t snap unless the grid is visible! Solution:
    – set the grid interval to every 1px
    – show the grid – crucial step :)
    – snap to grid

    Thanks for motivating me to revisit that! Cheers, Tim

  • SOMEBODY

    I have another solution if the one above has not worked for you.
    1. Click and hold on the guide line
    2. Now don’t let go and hold control
    3. Try moving the guide line, it should go where you want it to

    Hope it helps!

    • http://www.memelab.com.au tim

      Thanks for the reply drastic.soldier!

      Holding control is really useful if you want to temporarily disable snapping.. a great one to remember, thanks!
      (Note to self: This works when dragging any object which is snapping to the document bounds or other objects.)

      But wait! I’ve just tested holding shift whilst dragging the guides, and found that it constrains movement to whatever unit the ruler is set to! *deep sigh of relief* It had to be so simple!

      Thanks to all involved!

  • http://www.memelab.com.au tim

    I’ve looked at this again, and reckon that the bug is gone, and the behaviour is now ultra logical.. so, I reckon my topics drifted a little :)

  • Allex

    Thanks very much :D This is uesfull.