Copy link to clipboard
Copied
When working with compound shapes, pixels are rendered differently than individual shapes. To give some context, I have a set of pixel grid optimized icons that I am trying to export in a transparent format, after creating compound shapes.
Simple example shown below, of a 20 px by 20 px rectangle, with a 4 px by 4 px circle on top, both perfectly aligned to the pixel grid. The left is two individual shapes. The right is a compound shape, created using Minus Front in the Pathfinder Palette.
White Artboard (Zoomed In View):
Transparent Artboard (Zoomed In View):
Exported PNG 24 graphic with transparency, using Save for Web (Anti-Aliasing - Art Optimized):
Exported PNG 24 graphic with transparency, using Export for Screens (Anti-Aliasing - Art Optimized):
As you can see the left circle appears sharp and precise, regardless of export method, while the right compound shape appears fuzzy and smaller, so to speak.
To make things more interesting, below is an example of the same compound shape brought over into Photoshop, as a Smart Object, by pasting from the clipboard (Zoomed In View):
The same Photoshop file exported using Export, Export As, in PNG 24 format with transparency:
The compound shape appears perfectly sharp, when exported from Photoshop, but does not when exported from Illustrator.
Is there any way to achieve sharp raster graphics from compound shapes, directly from Illustrator?
Copy link to clipboard
Copied
Here's another example (without transparency this time, although the issue occurs both with and without transparency).
Individual shapes:
Compound shape:
Notice how the top of the arrow is not as sharp in the compound shape.
Zoomed in view from Photoshop below.
Individual shapes:
Compound shape:
The pixels are rendered completely differently between the individual and compound shapes. The color values are also different. The individual shapes have a lighter, more defined edge. The compound shape has a harsher transition directly from white to a darker shade of gray.
Copy link to clipboard
Copied
You might want to post this as a bug/feature request.
Most people on this forum are normal users just as you. We don't have any insight into the working of the code.
Copy link to clipboard
Copied
Thanks for the suggestion Monika. I wasn't sure if there was a setting or something I was overlooking. I thought maybe someone had run into the issue before.
If it is a bug, I'm looking for recommendations on how I might be able to solve the issue, or a workaround to it. Potentially an alternative method for creating transparency.
Copy link to clipboard
Copied
I don't think it's a bug. Compound shapes are live objects and their rendering is presumably just different.
In your case there's no transparency involved. There are only holes in your graphic, but no transparency.
Try if a compound path behaves differently.
Copy link to clipboard
Copied
It appears to be identical with both compound shapes and compound paths.
Right. What I am trying to achieve is creating graphics that have transparency. So, the holes will be transparent when exported as transparent PNG files.
Copy link to clipboard
Copied
It is probably the difference between transparency and no transparency.
The compound paths are rendered transparent which is probably using a different anti-aliasing algorithm as opaque objects.
Copy link to clipboard
Copied
The same issue happens whether it is exported without transparency, as in the second example I posted. However, you may be correct that the algorithm differs between compound shapes and paths vs. individual objects.
However, if that is the case, is there any way that I can achieve the same sharpness as when the objects were individual shapes?
Copy link to clipboard
Copied
You may try the Rasterize Effect in Illustrator to see if that gives a result that comes closer to what you want.
Copy link to clipboard
Copied
I know that this is a very old thread, but has this been resolved in the last 7 years or so? I have scoured the site and internet to find any other reference to this anomoly but surprisingly this thread is the only reference I have found that describes this!