Re: Anti-alias an NSIamgeView
Re: Anti-alias an NSIamgeView
- Subject: Re: Anti-alias an NSIamgeView
- From: Dennis De Mars <email@hidden>
- Date: Sun, 24 Nov 2002 18:12:25 -0800
Anti-aliasing is the process of preventing "aliasing" artifacts when a
signal is sampled. For an image, this means that if you have an image
at a high resolution, you pass it through an anti-alias filter before
sampling down to a lower resolution.
For geometric shapes (lines, bezier curves) and fonts which are defined
in terms of bezier curves, the resolution of the image before rendering
is effectively infinite. The standard way to apply anti-aliasing is to
render these objects at a high resolution (that is, at some multiple of
the pixels you actually need) and then apply an anti-aliasing filter
when downsampling to the actual resolution desired. That is what Quartz
does when you draw shapes and character strings into a view.
For predefined bitmap images, there is nothing Quartz can do if the
image is already at the size needed. If the predefined image is larger
than what you require, Quartz will apply anti-aliasing while scaling
down the image to the size requested. For instance, all of those images
you see in the dock are derived from a large icon which is scaled down
and looks smooth at any size, but to do this Quartz needs a large image
to begin with. If not, the results do not look good.
- Dennis D.
On Sunday, November 24, 2002, at 11:34 AM, Ben Mackin wrote:
On 11/24/02 1:22 AM, "email@hidden" <email@hidden> wrote:
At which ratio is your image drawn inside your NSImageView?
I draw it at it correct size, nor enlarging. Why? Does it matter if I
resize
the image or not?
AFAIK, there is no anti-aliasing with NSImageView, there is just image
smoothing.
Then how does Preview do it? I know that they use a subclass of NSView
to
draw the images into. Are they doing some custom anti-aliasing that
isn't
available to others? It seems that with all that is available from
Quartz
and anti-aliasing, that an image should be able to get some love to.
Thanks,
Ben
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.