Re: Image cache: Where is it and how do I refresh it?
Re: Image cache: Where is it and how do I refresh it?
- Subject: Re: Image cache: Where is it and how do I refresh it?
- From: Lon Giese <email@hidden>
- Date: Tue, 30 May 2006 01:52:42 -0700
NSImage has no way to know the you've changed the contents of any of
its image reps. Once it's generated a cached image for a given
resolution, it will hang onto it.
You need to request the bytes pointer (even if you don't ned it) every
time you update the pixel buffer - this has the implicit effect of
informing NSImage that the pixel buffer has/will be updated...
I don't remember where I read that and I tried searching for it in the
docs but cant find it... I am sure I read that though.. maybe someone
know where in the docs it is located...
On May 30, 2006, at 12:25 AM, Gregory Weston wrote:
On May 30, 2006, at 2:55 AM, John C. Randolph wrote:
On May 27, 2006, at 7:51 AM, Gregory Weston wrote:
If I remove the imagerep from the image and add a new one created
from the same buffer it works.
NSImage has no way to know the you've changed the contents of any of
its image reps. Once it's generated a cached image for a given
resolution, it will hang onto it.
I think (and I'm not being facetious or snide) that may be what I was
asking about. There's not any explicit way to signal to the view that
any cached data is likely to be invalid? I'll reiterate what I found
to be the most confusing aspect of this: If I asked the NSImage for
it's TIFF representation I got the right thing. If I told it to draw
itself - even after getting the expected TIFF - I got stale data.
It shouldn't be necessary to create a new instance, though. Removing
the rep and then re-adding it should suffice.
Actually, I tried that with no joy.
Is your view subclass actually an NSImageView subclass? If so, it's
making its own cached image, too.
Nope. Just a straight NSView.
G
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
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