Re: NSImageView bug?
Re: NSImageView bug?
- Subject: Re: NSImageView bug?
- From: Scott Harper <email@hidden>
- Date: Sat, 8 Oct 2005 16:51:50 -0600
It sounds like another side-effect of an issue I've worked through
where, when the NSImageView receives an image, it automatically
resizes (scales) caches that scaled image, and uses the cached image
for everything. So when you're resizing the view, it's probably
using the same (cached) image as i made before, rather than RE-
scaling the image for the current size. When you do that by hand,
yes it works as it should. I doubt it would be TOO much of a
processor hog, since you don't live resize a window whilst doing much
of anything else. The solution you came up with seems to be the best
one as far as I can tell.
--Scott
On 08 Oct, 2005, at 4:00 PM, Dario Mèndez Musicò wrote:
Il giorno 08/ott/05, alle ore 23:53, Andy Armstrong ha scritto:
On 8 Oct 2005, at 22:50, Dario Mèndez Musicò wrote:
I don't know if anybody noticed this, but NSImageViews tend to
show "blurred" images when the window gets resized.
I tried to search for a workaround, and stumbled into this
http://cocoa.karelia.com/AppKit_Classes/NSImageView_subclas.m
Unfortunately, this didn't help.
Experimenting a little further I've noticed that when testing in
interface builder the "blurring" doesnt' happen, but when the
application runs it does happen.
Anybody else is experiencing this or knows a working workaround?
It's because the coordinate system uses real numbers rather than
integers and can render images with sub-pixel alignment - which
results in the image being resampled to effect the sub-pixel
shift. Check the coordinates at which you're rendering the image.
--
Andy Armstrong, hexten.net
I'm not sure I get that... do you have an example or something?
Thanks in advance.
In the meanwhile I noticed that - resizeWithOldSuperviewSize:
doesn't even get called, so I tried subclassing
viewDidEndLiveResize and re-setting the image.
It works, but I'm pretty sure it will hog the processor (the resize
gets pretty sluggish already).
___________________________________
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB
http://mail.yahoo.it
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden