Questions tagged [nsimageview]

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.

248 questions
0
votes
1 answer

Inheritance from Both NSViewController and NSImageView (Swift)

How should I approach the situation of having to inherit from both NSViewController and NSImageView in the same project? Thank's!
ch_studend
  • 91
  • 2
  • 10
0
votes
0 answers

Allow Users to Save Image From NSImageView (Swift)

I am looking to allow users of an app to save the image displayed in a NSImageView to a chosen directory. (not one specified by me, in the code). I know I should use a modal window to allow them to choose, but nothing comes handy right now. Any…
ch_studend
  • 91
  • 2
  • 10
0
votes
1 answer

NSImageViewl Highlighting/Selection

(using Xcode 8b0 on 10.11.5, but the problem also occurs under 7.3) My app uses an NSColorWell and two NSImageWells to allow users to set a background (colour, image, pattern). The colourWell behaves just fine. The two image wells do not: if you…
green_knight
  • 1,319
  • 14
  • 26
0
votes
2 answers

NSView .transform equivalent?

Sorry if I've missed something really obvious here but I'm still quite new to programming :) So I'm trying to rotate an image view for a mac application, and I found out that in IOS for a UIImageView you can use this code: myImageView.transform =…
Giulio Crisanti
  • 370
  • 2
  • 12
0
votes
1 answer

Layout constraints to make NSView behave like NSImage in NSImageView

I have an NSView (myImage) with a CALayer, contents = an NSImage, so the view has now been sized to fit the NSImage exactly (size unknown and subject to change). This is inside another NSView (myContainer) that is pinned to expand and contract in…
Gary Simpson
  • 2,677
  • 2
  • 17
  • 18
0
votes
1 answer

NSImageView mouseDragged Value pass back to windowController

Can anyone please show me how to get the position X and Y back to my WindowController NSTextField (testTextX and testTextY)? I created a windowController, NSImage and NSTextField programmatically. I added an image "dot" to the NSView and would like…
David Evony
  • 273
  • 3
  • 15
0
votes
1 answer

Cropped rectangle doesn't work as expected

I have an NSView to draw a rectangle to crop image, and one NSImageView to be webcam (camera preview window). I want to put the NSView on the NSImageView. When I take a picture, it can produce a cropped image automatically. The problem is that when…
Sam
  • 765
  • 3
  • 6
  • 21
0
votes
1 answer

Using NSCollectionView with CoreData and an NSImageView

I'm trying to setup up a NSCollectionView which is binded to an entity and I'm trying to load an image into an NSImageView out of this entity. I stored the image as a NSData object. I did a little research and found out that I'm supposed to set a…
Tom Kuschka
  • 463
  • 1
  • 8
  • 17
0
votes
3 answers

avoid the NSImageView change the image after drag & drop

I have coded drag & drop for the NSImageView, and I set the NSImageView as the PDF/image files drop zone. But I found once the files dropped, the NSImageView shows the dropped file content and image. How can I avoid that? I want NSImageView shows…
SuperBerry
  • 1,193
  • 1
  • 12
  • 28
0
votes
0 answers

NSImageView within NSScrollView downward drift

I have a NSScrollView with a NSImageVIew within. I'm using magnification enabled on NSScrollView. I'm seeing a funny downward drift of the NSImageView when scaling using a 'pinch' gesture on my MBP track pad. If you pinch and un-pinch continuously…
0
votes
1 answer

Using NSImageView for video streaming

I am making an voip application which also has video support, for video, i am getting data as a YUV format and to decode i am using libvpx, and then i will RGB data, Now to display i am using NSImageView where i will change the NSImage, please…
Amitg2k12
  • 3,765
  • 10
  • 48
  • 97
0
votes
1 answer

Converting a CAShapeLayer to use in an NSImageView

I'm trying to port some iOS code for a Mac app. My code is as follows: func innerRing() { let innerRing = CAShapeLayer() let circleRadius: CGFloat = 105.0 innerRing.frame = InnerRingView.bounds func circleFrame() -> CGRect { …
ZbadhabitZ
  • 2,753
  • 1
  • 25
  • 45
0
votes
2 answers

How on OS X to programmatically force initial adjustment the size of image in an ImageWell, as ImageWell changes size due to LayoutConstraints

NSWindow NSImageWell - with constraint to all four side of the Window's containerView NSImage - is put in Well via NSPageControl Using the mouse, I resize the Window and the ImageWell expands or contracts with the Window as desire. The image…
mbarron
  • 99
  • 2
  • 9
0
votes
1 answer

Correct behaviour of Mouse down inside row of NSTableView?

I have a NStableView which is NSView based. In each row also have a NSImageView which is subview of NSView. I have subclassed this NSImageView then overrided mouseDown method. The problem is tableViewSelectionDidChange is also getting fired when…
Abhishek
  • 852
  • 9
  • 24
0
votes
1 answer

Swift OS X - Save .jpeg's into array of NSImage's

I have an OS X app written in Swift and I am attempting to iterate through a directory and save each image into an array of NSImages so that I can display them in an NSImageView one at a time. My code at the moment is below: func LoadImages() { …
Matt Kelly
  • 1,451
  • 2
  • 13
  • 30