Re: NSImage drawing on 10.5 issue
Re: NSImage drawing on 10.5 issue
- Subject: Re: NSImage drawing on 10.5 issue
- From: Ken Ferry <email@hidden>
- Date: Wed, 30 Jun 2010 01:36:36 -0700
On Mon, Jun 28, 2010 at 8:24 PM, Graham Cox <email@hidden> wrote:
> I have an NSImage which I generate by specifically creating a NSPDFImageRep
> and adding that to an empty image. Later this same image rep is used to
> write the image as a PDF file to disk.
>
> An interface displays these images, either loaded from disk or made on the
> fly as above. The image's native size is quite small and they are often
> scaled up when drawn, but since they're PDFs that should work OK.
>
> On 10.6, these render really nicely and I always get crisp drawing. On 10.5
> however, they render quite fuzzily, which I'd prefer they didn't.
>
> Obviously the problem is the bitmap caching that NSImage does, and which
> must have changed for PDF images in 10.6. I set the caching of the image to
> NSImageCacheBySize, which gives me a useful drawing speed-up compared with
> NSImageCacheNever, but the cached bitmaps are fuzzy on 10.5, presumably
> because they're being scaled up and the bitmaps cached the original size,
> not the drawn size. Is there anything I can do about this?
>
> I set the context's image interpolation quality to high when these are
> drawn.
>
Hi Graham,
I'm a lot more familiar with the post-10.6 code than the 10.5 and before
code, but I think you probably need to either turn off the cache or
essentially manage your own cache by replacing the image when the scaling
changes.
Given that this problem is fixed in newer OSes, I would be tempted to just
turn off the cache in 10.5.
-Ken
Cocoa Frameworks
>
> --Graham
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden