An NSImageView object displays a single image from an NSImage object in a frame. An editable image view object behaves as an image well and supports copying, pasting, dragging, and using the Delete key to clear its content.
Questions tagged [nsimageview]
248 questions
4
votes
2 answers
How can my code get notified when the user pastes or drags an image into NSImageView?
I have an instance of NSImageView. I have told InterfaceBuilder to allow the user to paste or drag an image into this view. This works. However, I don't see a way in the NSImageView or related documentation to get notified when this actually…

Max Pierce
- 63
- 4
4
votes
2 answers
Translating clicked NSPoint in NSImageView to correct pixel coordinates in the underlying NSBitmapImageRep
Here is what I'm trying to accomplish: I'm working on an open source TI calculator emulator where I'm currently trying to add skin support. The skin image is just an NSImageView with its image set to the skin image. I override the mouseDown: method…

user256411
- 51
- 3
4
votes
2 answers
Create Image programmatically in Objective-C
I want to know is it is possible to create a blank image programmatically in Objective-C (Mac osx)? My requirement is I want to create a watermark, so one source image is there.. But i need to create an another image and add some text to that image…

Jio
- 1,146
- 1
- 9
- 22
3
votes
1 answer
Creating memory efficient thumbnails using an NSImageView (cocoa/OSX)
I am creating small NSImageViews (32x32 pixels) from large images often 512x512 or even 4096 x 2048 for an extreme test case. My problem is that with my extreme test case, my applicaiton memory footprint seems to go up by over 15MB when I display…

Mike2012
- 7,629
- 15
- 84
- 135
3
votes
1 answer
Setting an image on NSImageView
I'm having a problem with my program. Basically what i want is, i have 2 nssecuretextfield and i have a button. if both are equal, it shows one image on the nsimageview, if not it displays other image. This could be very easy, but i'm new to mac…

Pedro Vieira
- 3,330
- 3
- 41
- 76
3
votes
1 answer
How does NSImage's data retaining behaviour work?
I have a method that constantly loads new image data from the web. Whenever all data for an image has arrived, it is forwarded to a delegate like this:
NSImage *img = [[NSImage alloc] initWithData:dataDownloadedFromWeb];
if([[self delegate]…

carsten
- 31
- 2
3
votes
2 answers
NSImageView fails to setImage?
I'm trying to create a simple ImageView that just loads an image from disk, but this isn't working (I put it in my applicationDidFinishLoading):
NSString *file = [@"~/update.png" stringByStandardizingPath];
NSImage *image = [[NSImage alloc]…

Patrick
- 31
- 2
3
votes
2 answers
Images in NSImageViews randomly turned upside-down
So, I have this odd issue in my Cocoa app. A toolbar item, and some NSImageViews just render their image upside-down for no apparent reason. The toolbar item actually comes that way when I launch the App for some reason (the icon is assigned in…

Tristan
- 3,058
- 6
- 40
- 68
3
votes
0 answers
How can I vertically centre the NSImageCell inside a NSImageView
I have a NSImageView which dynamically displays an image. I'd like the image to be vertically centred in the image view's bounds. How can I achieve this? I think the code I've written makes sense, but NSImageAlignment doesn't seem to have any…

glenstorey
- 5,134
- 5
- 39
- 71
3
votes
1 answer
How do I detect if a drag operation was cancelled using NSDraggingInfo or similar?
I've created a subclass of NSImageView and implemented the informal protocol for dragging images between other instances of the same class. I am keeping a reference to the image of the view prior to the dragging operation and am able to set it back…

Thom Mahoney
- 481
- 1
- 3
- 12
3
votes
2 answers
NSImageView: display large images
I am working on an image-browser app for OS X. It is very similar to QuickLook: you pick a folder, the app displays the first image in it, and you can use the arrow keys to quickly move to the next/previous picture.
Now, I'm testing my app with RAW…

Diego
- 577
- 4
- 14
3
votes
2 answers
Disable user interaction for NSImageView
I have 2 sets of images. One set contains draggable ones and other is a static set. I have implemented drag-drop functionality for the draggable images. This is because the images needs to be dragged to static ones which contains matches. Now after…

Eshwar Chaitanya
- 942
- 2
- 13
- 34
3
votes
1 answer
NSImageView transparency
I'm beginner with programming for OS X and I have problems with setting NSImageView transparency.
In iOS it was quite simple, there's property in UIImageView called alpha and I could change it and animate it. (like imageView.alpha = 0.5)
How can I…

Wojtek
- 1,006
- 11
- 30
3
votes
1 answer
NSButton rendering issues when displayed over NSImageView
I have a NSButton sibling on top of a NSImageView.
Whenever I click the window, there are some rendering issues. It looks like this:
As you can see, the white edges are the problem.
Strangely, this problem even persists if I override…

IluTov
- 6,807
- 6
- 41
- 103
3
votes
1 answer
NSImage returns nil even when png file is in Resource folder
I'm trying to load an image using NSImage imageNamed: method but i have no success
i have copied the image in the project folder: Project>Resources and added to the project using: "Add files to project ..."
NSImage* image = [NSImage…

Giquo
- 151
- 2
- 14