The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Photoshop CS2/CS3 beta bug: fuzzes on resize of vector shapes

Recently, I struggled with Adobe Photoshop CS2's Shape Tool. I was disappointed to discover that my shape tool (rectangle in this case) when in the fill layer setting, was automatically anti-aliasing all my edges (not just the rounded corners as expected). Two other web developers have confirmed the same results in CS3 beta as well. Crisp in Fill Pixels (with option to antialias), but fill layers refused to draw crisply.

Solution: It appears that CS2 has the unexpected behavior that drawing with shape tools on fill layers when zoomed other than 100% causes the fill layer mask to automatically anti-alias! Zoom back out to 100%, and the shape draws "crisp" as expected!

I wrote about it in more depth on my website along with a sample image, and I have reported this bug to Adobe but have heard nothing back since. If anyone else can reproduce the same result or requires more info for the same, please post here (and on Adobe's bug report tool).

When drawing such a rectangle, you should remember about a few things:
1. Turn "Snap to pixels" option on
2. When scaling, set the base point of the transformation to rectangle's corner instead of its center. The factor you are scaling with also matters - 113&#37; (for example) will always result in "blurred" edges, while 200% will be perfectly sharp.
3. I'd rather recommend stretching the sides of the rounded corner rectangle instead of scaling it - you'll keep the same radius of the rounded corners.

█FreelanceDaddy - freelancer's personal advisor█ Guide and advice for freelancers starting their career
█ Over 1000 projects posted on freelance markets every day
█ One-stop resource for online freelancing

It is a bug: a vector edge should be a vector edge should be a vector edge. Only if I choose "anti-alias" (an option in another vector/shape tool) should I get fuzzy edges. The zoom level at which I am viewing a vector shape to nudge or stretch a shape (or resize) should have no effect on the fuzziness. For fine nudges, clearly 100&#37; zoom is not going to suffice-- especially if snap-to is on.

If you would, please follow my steps to reproduce the issue and see if what I posted is in fact unexpected behavior.

Thank you for your speedy reply, my apologies for my lack thereof. I must have some issues with notification settings.

That is incorrect. The vector tools (called something like Fill Layers or Shape Tools) are as vector as they get-- they stay vector from first stroke to final publish or until a layer affect need be applied (at which time, of course, they get rasterized).

Vector shapes remain crisp when edited except when edited at a different zoom level. Vector vs. raster should not affect this behavior at all: even at a different zoom level, a precise pixel can be estimated crisply: the edges are simply anti-aliasing when we don't ask them to be.

The whole point of a shape tool is to allow the designer to work in reusable, resizable, uncommitted shapes upon which one can perform unions/intersections, etc without "committing" changes. There is a checkbox "antialias" option in another vector tool in CS2 (the tool escapes me), and this one simply lacks it. Instead, it antialiases at zoom levels other than 100&#37; and does not at 100%.

(I'm not meaning to harp-- only building more keywords for other hapless designers who might experience the same effect. I am confident this is a CS2/CS3 beta bug, but I am not confident that my issue with resizing vector/fill layers automatically antialiasing reported to Adobe was really heeded).

If you worked a bit more with vector tools in Photoshop, you'd notice that in different zoom levels they have different "step" value for moving the points for example.
In 100&#37; zoom they'll be moved by one pixel, while in 1600% - by a fraction of a pixel, which results in a partially transparent edge. And that's normal behaviour, not a bug.
And they still remain vectors, but the way they are represented by pixels results in a blurred (anti-aliased as you call it) edge.

If a vector edge does not snap to "full pixels", but can be positioned "in between" - the result is a partially transparent line. That's how the raster representation of vector shapes works. That's math, not a bug.

█FreelanceDaddy - freelancer's personal advisor█ Guide and advice for freelancers starting their career
█ Over 1000 projects posted on freelance markets every day
█ One-stop resource for online freelancing

Why would Photoshop (as a raster program) show a shape differently at higher zoom levels? The image you see when you zoom in is the exact same image you see at 100&#37;, no pixels added, no anti-aliasing done, it was all there before. Photoshop simply does it's best job of scaleing your work to the zoom level you choose, within the limits of raster based display.*

As Varelse mentioned, make sure you have Snap to pixels enabled, this should stop the blurry edges from appearing on flat edges your shapes.

* Illustrator, on the other hand, is a real vector application, and continues to show smooth/crisp detail at any zoom level.

Joey33-- thanks for resurrecting this most annoying bug. Do you have a solution? other than working at 100&#37; for life?

As you can see:photoshop-shape-tool-anti-alias-bug
in the comments, there are a handful of responders who have themselves weighed in.. I'd like to get this resolved once and for all (and posted everywhere I've peppered the web with keywords...)!

Also, how did you determine that it's a recognized bug at Adobe? Is there some way to know that issue reports are responded to?

Last edited by BCSWebStudio; Jul 2, 2008 at 08:30.
Reason: how did you know it's a recognized issue @ Adobe?

Interesting. I spent a few minutes trying to get the bug you were talking about, with no results.

Of course - if you untick "snap to pixels", the shapes created at >100&#37; zoom WILL have blurred edges, as the vector line is positioned at fractional pixel width/height.
But once you tick "snap to pixels" there was no way for achieving a blurred edge.

So this tool seems to be working perfectly - producing sharp edges when you want them and blurring them when you need - everything under user's control, which is how it should be.

Could you please confirm, that this what-you-call-a-bug occurs with the "snap to pixels" option selected?

█FreelanceDaddy - freelancer's personal advisor█ Guide and advice for freelancers starting their career
█ Over 1000 projects posted on freelance markets every day
█ One-stop resource for online freelancing

I followed the link to website you sent me and now I remember - Bronius is the guy I mailed with as to the bug.

The solution I found is unfortunately not a snake oil. It is, better say, a workaround. As I read the comments on Bronius website, Alex discovered the same stuff.

Here is my story:

The bug (esp to forum members doubting that it exists):

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 t h e m o r e you 'travel'. And so the shapes have fuzzy borders even when snapped to pixels. Since the pixels fall between integer values, the borders are fuzzy.

Fix:
The workaround is to enter the preferences and tamper with the grid - set it to a few pixels, then again to one. And magic happens - suddenly the ruler and the grid go 'hand in hand' and the vector masks render crisp borders no matter the zoom (your observation about the 100% is correct - at 1:1 vectors snap to integer pixels).

The 'solution' is not permanent BUT how often do you instal PS? Once set, it works fine for months/years until next potential reinstal. The point is that I can work with PS now, since the bug is really ANNOYING and in my opinion makes work pain in the neck. Simple transformations when polishing the UI ruin the clarity of elements.

Somebody said above that software for vector is Illustrator (which I also use btw). Yes, you're right, but IF Ps has such functionality, it should work as intended. I haven't as yet heard from adobe about fixing the bug. I wonder if it persists in newer versions of PS.

Anyway, hope this helps you. Better than nothing and makes you shapes crisp and clear

Hmm, adobe may have addressed the issue finally. I haven't reinstalled my ps for a long long time now. So the CS2 you are checking with may be updated already.

I remember there was a quite ardent debate on adobe forum about the issue and the bug was confirmed by other users. We submitted bug reports so hopefully it works now without any irrational grid tampering.

I wish I had saved screenshots - you would see how silly problems with calculation Ps had (I repeat - that happed only in zooms bigger that 100%.)

Can you confirm that this bug occurred WITH the "snap to pixels" option turned ON?
I heard several complaints from the Photoshop users not being aware of the existence of this feature and blaming the software, not their lack of knowledge of the tool.

And as for the CS2 version I checked this "bug" on - it's been months ago - just during the discussion in this thread and no possible "bug fix" was available for sure.

█FreelanceDaddy - freelancer's personal advisor█ Guide and advice for freelancers starting their career
█ Over 1000 projects posted on freelance markets every day
█ One-stop resource for online freelancing

To summarize, the grid was placed on float values even though its precision was set to 1px. Vectors were, in turn, snapped to the grid and since it was wrongly placed, the vectors' borders were blurred.

Interesting work-around!
I guess that by setting and then resetting the grid size, you're, in effect, honing the approximating algorithm: maybe it's similar to how resampling (down-sampling) a raster image from 2000px down to 100px in one motion results in a less clean thumb of the full than if you were to down-size in several steps (2000px > 1500px > 1000px > 500 px > 100px for instance).

But that's off topic.

Thanks very much for closing the gap on this. I just installed CS3.3 at home and will see if I can confirm persistence or fix of the bug. Then I will try your work-around and report back. As stated above, CS3 beta still suffered the issue..

Problem persists in PS CS3.3: whether I have snap on or off, I pick the rectangle tool, choose shape layers, draw at 100&#37;, and I've got crisp edges. Less than or greater than 100% zoom, and I get fuzzies.

Once I adjusted the grid size to 1px (was 1 inch by default) and kept major divisions as 4, I tried an experiment (see attached image). Here, zoomed to 3200% so I can see divisions and 1-pixel grids, I clicked on the major div and drew out a 4x4 square then a 20x20 square on the lines, and then a 14x14 (not 16x16) block by starting the drag between major divisions. Notice the unexpected fuzz on the off-division lines.

Restating the above just now, however, I wonder if "shape tool" really qualifies as a vector since you can't ever go back and edit it as a filled path, can you? And, in fact, the only real vector functionality in PS is the Pen Paths, correct? Once you stroke it, you've rasterized.. correct?

Back to Joey33's workaround: does that affect the above bug or only the apparent disjoint between grid and ruler?

Restating the above just now, however, I wonder if "shape tool" really qualifies as a vector since you can't ever go back and edit it as a filled path, can you? And, in fact, the only real vector functionality in PS is the Pen Paths, correct? Once you stroke it, you've rasterized.. correct?

Well the Shape Tool does really qualify as a vector indeed. What it comes down to that it's a fill-layer with a vector mask. Any vector mask can be edited afterwards. The ankerpoints can be manipulated with the white arrow tool or when the schape is selected with either the white or the black arrow tool, ankerpoints can be added/removed with the pen-tool.

If you want to give the shape a stroke, you can apply the layereffect 'stroke' which is dynamic - if you manipulate the path, the stroke changes with it - vectorapplication style.

I've seen a lot of people using the pen/shapetool only to make a shapeform and afterwards making a selection from it and then filling it - or as you say (at least I think you mean that) Stroke the path by right-clicking on it and choosing Stroke Path which indeed renders (pixels) at the path-lines.

The display engine of photoshop doesn't do a good job at displaying vectors as they are - when you zoom in non-straight lines are always jagged (apart from the bug that you described).
The only way to see/test if it will output as a vector is to save it as an Photoshop PDF and open it with for instance Acrobat Reader (or ofcourse Indesign / Illustrator).

Sure hope I understood your questions right and if so was able to contribute something to your (or someone elses) knowledge.

Ok you make some good clarifications. To that, I'd like to add that I wouldn't expect the vector to render out to a PDF (or other vector-supporting format) as vector at all. I wouldn't even expect the path tool to do so.. does it? I've not tried..