Hi,In my application I am displaying an image received from some third party 
camera library function in NSImageView on screen. On "Capture" button click the 
image is first saved on hard disk and then I display that image on screen. It 
works fine during the first time when I start my application. But when I close 
the window (not the application) that has NSImageView and comes back later the 
NSImageView stops updating. On Capture button click the new image is created on 
hard disk but NSImageView keeps showing the previous run's image. I am using a 
modal window here. I even tried to clear the NSImageView on window close button 
click (using [imageView setImage:nil] ) but still screen shows the old image 
when i open the window next time.This is what I am doing on Capture button 
click Create CameraImage.tiff file using third party camera library. (The image 
is always saved with same name hence overwritten.) Display image in 
NSImageView. Here is the code for displaying the image (vo
 id)displayCapturedImage:(char *)imgname contrastvalue:(double) camcontrast { 
NSImage *image; image = [[NSImage alloc] initWithContentsOfFile:[NSString 
stringWithCString:imgname encoding: NSUTF8StringEncoding]] ;[calibChipView 
setImage:image]; [calibChipView setNeedsDisplay:YES]; //show the contrast 
value[contrastfield setIntValue:(int) camcontrast]; [contrastfield 
setNeedsDisplay: YES];[image release]; }RegardsAbhijeetDear cocoadev ! Get 
Yourself a cool, short @in.com Email ID now!
_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to