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
1
vote
0 answers

How to get and save GIF Image from NSImageView to disk

Currently I am working on an NSImageView, on which the user drags and drops an image, and the images gets saved to the disk. I am able to save png and jpeg images, but while saving GIF images, all that is saved is a single frame from the gif. The…
Chintan Ghate
  • 179
  • 1
  • 8
1
vote
2 answers

adding NSImageView to NSScrollView

I have an image with a dimension of about 200x2000 pixels. I want to display the image centered in a 200x200 rectangle but I want to be able to move it up and down. Best I can figure I need to add an NSImageView to an NSScrollView but I can't figure…
lusher00
  • 678
  • 1
  • 7
  • 18
1
vote
1 answer

Unable to set the image property of a NSImageView in swift

I'm trying to set a image to an NSImageView but unable to do it. Here is my code class zoomableImageView: NSImageView { var newZoomFactor : CGFloat = 0 // some function ... } in the appDelegate class @IBOutlet var imageView: zoomableImageView! …
moxou
  • 11
  • 4
1
vote
2 answers

NSImageview change in two active viewcontrollers at a time

I have two viewcontrollers 1) Profile.h &.m, 2) settings.h &.m. Both have NSimageview, so when i change imageview on settings,thenn at same time how change imageview on opened viewcontroller profile.
Rakshit Korat
  • 1,159
  • 10
  • 23
1
vote
2 answers

How to bind NSImageView by path?

I have a program with tableview/details of core data object. One of the attributes is an image (it only appears in the details). I think it's best to save just the path to the image file, rather than the image itself (it seems to me that core data…
user4132864
1
vote
0 answers

Rotate NSImageView in Swift

I using playground to rotate the following image. let imagePath = pathToFileInSharedSubfolder("gauge.png") let image = NSImage(byReferencingFile: imagePath)! let imageView = NSImageView() imageView.image = image //Frames let imageframe =…
Michael Rivers
  • 920
  • 2
  • 10
  • 17
1
vote
1 answer

Detecting Size of Retina NSImage

I'm dropping an image into an NSImageView and outputting the image's size. This works fine for standard images, but I want to output the size of retina images in their non-retina size, for example a 100x100 @2x image I want to output a size of…
Mark Bridges
  • 8,228
  • 4
  • 50
  • 65
1
vote
0 answers

How do I get an NSImageView to display a PDF with a white background?

I have an NSImageView in the lower left with a red background. In the screenshot it is displaying a PDF document. I want the shape of the document filled in white white, instead it is transparent and the red background bleeds through the document.…
Roland Rabien
  • 8,750
  • 7
  • 50
  • 67
1
vote
1 answer

How to invert the NSImageNameMenuOnStateTemplate image when making a custom NSMenuItem view?

I am writing a custom NSMenuItem view. I would like to be able to use the system default "on state" menu item image (the image named NSImageNameMenuOnStateTemplate) within an NSImageView subview of my custom NSMenuItem view. The checkmark image…
Daniel Trebbien
  • 38,421
  • 18
  • 121
  • 193
1
vote
1 answer

NSImageView size vs NSImage size

Does the size of the image used for an NSImageView need to be the same dimensions as the image view? As an example, when I have an icon image with dimensions like 64px by 64px then I make sure the NSImageView that displays the image is also 64px by…
wigging
  • 8,492
  • 12
  • 75
  • 117
1
vote
0 answers

Reposition contents of NSImageView

I have an NSImageView object sized to a specific aspect ratio. The view is set up as editable and I can drag and drop images into it. How do I set it up so the user can drag the embedded image around, effectively reframing it within the frame of the…
Paul
  • 189
  • 10
1
vote
1 answer

How do i bind NSImage array to a NSCollectionView

I have a NSCollectionView, whose view contains an Image Well. (NSImageView) I have an array of NSImage. I am able to bind the array to the NSCollectionview using Value > Collection View Item > representedObject So that i see the number of items in…
1
vote
1 answer

How to catch click event on NSImageView as subview in NSTableRowView?

In NSTableView I have NSTableRowView and in this row there is some NSImageView subview. Question: how to track click event on this image?
ruslan.berliner
  • 121
  • 2
  • 13
1
vote
2 answers

How to animate a GIF image in Cocoa and set it to not loop.

Just as my title mentions, I want to use NSImageView, To "animate" an image, but not loop when it reaches the end of its animation.
Andrew Chang
  • 1,289
  • 1
  • 18
  • 38
1
vote
1 answer

How to draw background image repeatedly with Mac OS

I am new in Mac OS programming. I would like to draw image repeatedly in background since my original image is small. Here is the code of drawing the image, but it seems enlarge the image which means it only draw one image instead of multiple. //…
YU FENG
  • 888
  • 1
  • 12
  • 29