on Mac OS X, an NSImage object is a high-level class for manipulating image data
Questions tagged [nsimage]
681 questions
0
votes
2 answers
App reply not called when passing non-null parameter from NSXPCConnection
I'm using XPC to seperate a project into two projects - a main project, built for os x @ 64-bit, and an XPC service built for os x @ 32-bit, as it is using a library that is not available for 32 bit and cannot be replaced. The two communicate using…

Niv
- 2,294
- 5
- 29
- 41
0
votes
1 answer
Drawing text onto an NSImage in a loop - but how do I clear the cache?
I have an NSTimer calling a method once a second, which checks a simple integer value, called 'total'. This value is then drawn on top of an NSImage and displayed on the screen.
NSImage *totalIcon = [NSImage imageNamed:@"round_red"];
[totalIcon…

Gavin Smith
- 181
- 10
0
votes
0 answers
Get NSImage of generic lcd icon
I'm trying to create an NSImage of the generic lcd icon found in /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/public.generic-lcd.icns. Currently, I load this icon using the following code:
NSImage *icon = [[NSImage alloc]…

Frog
- 1,631
- 2
- 17
- 26
0
votes
0 answers
NSButton setImage not working
I am trying to change the image of my nsbutton for my application.
I have searched and found a couple of ways to do so but none of them are working for me at the moment.
I have looked at the following solutions :
How to set NSButton background…

Tanzeel
- 455
- 6
- 16
0
votes
0 answers
NSImage is not displayed on some computer
Did anyone get the same problem? I load a png image using NSImage initWithCotentsFile and display it in a view using drawInRect:fromRect:operation:fraction:. In a very rare case, some of users using mac os x 10.9.2 complain the image is not…

ken
- 63
- 1
- 4
0
votes
2 answers
Error saving NSImage as NSData
I am using the following code to save a frame of a movie to my desktop:
NSCIImageRep *imageRep = [NSCIImageRep imageRepWithCIImage:[CIImage imageWithCVImageBuffer:imageBuffer]];
NSImage *image = [[[NSImage alloc] initWithSize:[imageRep size]]…

Ricky
- 309
- 1
- 5
- 13
0
votes
4 answers
NSImageView setImage won't set image
I am trying to set image for an NSImageView instance object in a Cocoa project. My code looks like this:
itemTableCellView * xx = [tableView makeViewWithIdentifier:@"MainCell" owner:self];
xx.label.stringValue = [tempCi simpleTxt];
xx.img…

Marci-man
- 2,113
- 3
- 28
- 76
0
votes
1 answer
NSImage is always being scaled and looks bad
I want to create an NSImage of an NSScrollView object, so I can use the flat graphic for animation purposes.
When I render my scrollview object into a graphic and add it back to my window, it works but looks really bad like it's been scaled to 99%…

beely
- 83
- 6
0
votes
1 answer
Calculate position of NSScrollView relative to main image
Assume I load an NSImage of dimensions 2000x2000 and display only a portion of the picture inside an NSScrollView with frame size 500x300. How can I calculate the distance between the images 0,0 origin and the views 0,0 origin (so I can determine…

Bender
- 357
- 5
- 15
0
votes
2 answers
Reduced image size in NSScrollView
I'm trying to load an image into my NSImageView/NSScrollView and display it at actual size, but the image mysteriously ends up getting displayed at about half-size. I thought at first it might be being reduced to fit into some kind of constraints of…

Bender
- 357
- 5
- 15
0
votes
0 answers
How can I remove remove one color channel from an NSimage?
As the title says: how can I remove remove one color channel from an NSimage?
Basically I want to achieve a result equivalent to opening an image in Photoshop and deleting all the info in the red channel.
I'm guessing there's maybe a way to do this…

dmid
- 483
- 4
- 18
0
votes
1 answer
CorePlot chart not showing up in PDF made with -dataWithPDFInsideRect
I'm generating a PDF from a view using -dataWithPDFInsideRect:.
Within the view is a CPTXYGraph which displays wonderfully in a Window but doesn't show up in the PDF at all.
I also tried putting an NSImageView into my view, then generating an…

Kenny Wyland
- 20,844
- 26
- 117
- 229
0
votes
0 answers
load a nsimage file from local path using sandbox
I'm trying to load a PNG image from a local volume. The user chooses the file using a normal NSOpenPanel. After enabling sandbox the init method to load a local file return nil.
I'm also trying to use NSURL but i can't figure out how to use for…
user2970742
0
votes
2 answers
Animation of NSImage gets lost after archiving it with NSKeyedArchiver
Following situation:
I have an instance of my NSObject sublcassed object. One of it's properties is a NSImage. After instanciating the object I convert it with NSKeyedArchiver to data, send it over the network, unarchive it with NSKeyedUnarchiver…

papr
- 4,717
- 5
- 30
- 38
0
votes
0 answers
NSImage drawAtPoint lost quality
I have a monochrome picture,When i draw this picture to another picture, it become a gray picture.
Here is my code:
Save a monochrome picture:
NSImage *copyImage = [image copy]; // Copy from a monochrome picture
NSBitmapImageRep…

Garpery
- 1