NSImageView display problem

  • 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!
  • 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 macosxdev ! Get Yourself a cool, short @in.com Email ID now!
previous month june 2012 next month
MTWTFSS
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30  
Go to today