Questions tagged [nsimage]

on Mac OS X, an NSImage object is a high-level class for manipulating image data

681 questions
3
votes
2 answers

How to create an NSImage from an NSView that isn't completely visible?

I have an NSView in an NSScrollView that I want to create an NSImage from. Because it's in an NSScrollView it's not always completely visible, and it can be even bigger that the screen's size. Can anyone help me? Thanks.
user142019
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

IKImageView choppy?

I have an IKImageView, and I'm putting CGImages (That I make out of NSImages) onto it. However, a normal 200DPI 8.5/11 page takes like 3 seconds to come up, appearing in rectangles about 2inches (screen) on a side at a time. This is really annoying.…
Brian Postow
  • 11,709
  • 17
  • 81
  • 125
3
votes
2 answers

Changing the Color Space of NSImage

Is there a way I can change the color space of an NSimage or NSBitmapImageRep/CGimage or the like. I am open to any way. Preferably the way photoshop does it.
Alex Zielenski
  • 3,591
  • 1
  • 26
  • 44
3
votes
1 answer

Set EXIF data to a NSImage in Swift, Cocoa, Mac OSX

I am trying to set EXIF data to a NSImage if the image doesn't have EXIF data. Actually I want just set the DateTimeOriginal. But my approach doesn't work. let completePath = "/Users/stefocdp/image.jpg" let dateFormatter =…
stefOCDP
  • 803
  • 2
  • 12
  • 20
3
votes
1 answer

CMYK NSImage get pixel data

I'm loading CMYK jpeg image to NSImage, How can i extract c,m,y,k values for a specific pixel ? How can i get byte array with all the CMYK pixel data.. in RGB images i'm using .bitmapData but it seems for CMYK images it is all 0xff. I have tried…
ibm123
  • 1,214
  • 2
  • 15
  • 39
3
votes
1 answer

How to Display .svg image in XCode 6.3.1

Good Day. I am making an extension for mac. The RestAPI i am using is providing image url that has .svg format images. I tried loading .svg images but nothing appears. I know mac supports png images and there is a tedious way to render .svg image on…
Ali Abbas Jaffri
  • 153
  • 2
  • 15
3
votes
1 answer

AFNetworking 2 - Image upload - Request failed: unsupported media type (415)

I know this question was answered multiple times, but I tried all the answers with no luck. I don't think that I do something fundamentally wrong but something goes definitely wrong here. I use the following code to upload PNG files to tinypng.com.…
Dirk
  • 2,011
  • 1
  • 20
  • 25
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

Where are the image files for the constants in NSImage located?

I'd like to get the image files for the constants definied in NSImage.h, like NSImageNameGoRightTemplate for example. I'd like to copy and edit some of them. Does anybody know where those images are located? I'm too stupid to find them on the…
marsl
  • 959
  • 1
  • 14
  • 25
3
votes
2 answers

NSImage Crop Crashing

When I try to crop an image using NSImage's imageFromRect, I get an EXEC_BAD_ACCESS crash about 50% of the time. This is something that runs on startup (triggered in an awakeFromNib), so the environment shouldn't be changing. I am not sure why it…
Bridger Maxwell
  • 2,081
  • 1
  • 19
  • 25
3
votes
4 answers

NSImage acting weird

Why is this code setting artistImage to an image with 0 width and 0 height? NSURL *artistImageURL = [NSURL URLWithString:@"http://userserve-ak.last.fm/serve/252/8581581.jpg"]; NSImage *artistImage = [[NSImage alloc]…
Chetan
  • 46,743
  • 31
  • 106
  • 145
3
votes
1 answer

NSImage and UIImage give different NSData representations

Scenario: I have an image in the iPhone camera roll. I access it using ALAssetLibrary and get an ALAsset object. I get a UIImage and NSData object from it using something like the following code. ALAssetRepresentation *rep = [myasset…
Tayyab
  • 422
  • 5
  • 17
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
3
votes
1 answer

Cant access NSImage object or not able "import NSImage.h"

Well I am confused because should be a no brainer. In Xcode 5 I start a new iphone project. In ViewDidLoad I begin typing: NSImage *image ... Actually at the point of "NSI" ... the NSImage is not available. I see many other options like NSInteger…
drlobo
  • 2,139
  • 5
  • 32
  • 42