On Mon, Jun 28, 2010 at 8:24 PM, Graham Cox <graham....@bigpond.com> 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 (Cocoa-dev@lists.apple.com) > > 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: > http://lists.apple.com/mailman/options/cocoa-dev/kenferry%40gmail.com > > This email sent to kenfe...@gmail.com > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com