on Mac OS X, an NSImage object is a high-level class for manipulating image data
Questions tagged [nsimage]
681 questions
0
votes
1 answer
Sending an image to a web service using their API URL
I'm trying to use the Bufferapp API to automatically create some buffers for social networks and have them posted at automated times.
I need to use their API, specifically this method, to send in my posts over with an image and text. I have figured…

Andy Ibanez
- 12,104
- 9
- 65
- 100
0
votes
2 answers
Saving an image in a NSView
I have problem with rotating and saving JPEG NSImage. I have NSView which is flipped
- (BOOL)isFlipped
{
return YES;
}
Then I'm applying NSImage rotation with following function:
- (NSImage*)imageRotatedByDegrees:(CGFloat)degrees
{
// calculate…

Jodynek
- 103
- 2
- 10
0
votes
1 answer
Saving NSImage as PNG with no alpha and 5 bit colour
I have an NSImage that I would like to save as a PNG, but remove the alpha channel and use 5 bit colour. I am currently doing this to create my PNG:
NSData *imageData = [image TIFFRepresentation];
NSBitmapImageRep *imageRep = [NSBitmapImageRep…

Magic Bullet Dave
- 9,006
- 10
- 51
- 81
0
votes
1 answer
How do I add a static NSFolder image to a cocoa bindings table
I have a table that gets it's values from core data and is added via cocoa bindings. The values that are printing out in the table are folder names.I would like to have a NSFolder printed out to the left of each folder name. I started off with a…

Scott
- 1,322
- 4
- 23
- 37
0
votes
0 answers
Core Animation Layer Degrading NSImage Quality
So I have a view in which I need to use Core Animation Layer, but I have an NSImage inside an image well in the view, and when I add the Core Animation Layer through the interface builder, the image quality is degraded. Here's an example:
View…

Matt Cooper
- 2,042
- 27
- 43
0
votes
2 answers
OS X - How to save NSImage or NSBitmapImageRep to PNG file without alpha channel?
I'm building an OS X app that needs to save the file to disk.
I'm currently using NSBitmapImageRep to represent the image in my code, and while saving the image to disk with representationUsingType:properties: method, I want to set the hasAlpha…

Void Main
- 2,241
- 3
- 27
- 36
0
votes
2 answers
How can I get the actual image of an image file in OS X?
When I use iconForFile: in NSWorkSpace class, I get the default Mac image file icon.
However, I would like to get the actual image that are previewed on the desktop.
How can I go about this?

wayfare
- 699
- 2
- 9
- 17
0
votes
1 answer
drawInRect retains NSImage until some point in the future?
So I have some code running in an NSThread that creates, in a loop, a whole bunch of NSImages. A small section of each of the images is drawn into another NSImage, and then the thread exits.
So, something like
NSImage *outputImage = [[NSImage alloc]…

Dave Branton
- 494
- 3
- 11
0
votes
0 answers
Cannot Opening Image using NSOpenPanel
I need to open image using NSOpenPanel. I did it using the following code:
NSOpenPanel *open = [NSOpenPanel openPanel];
NSArray *fileTypes = [[NSArray alloc] initWithObjects:@"jpg", @"gif", @"png", nil];
NSURL *filePath = [[NSURL alloc]…

Nikita Zernov
- 5,465
- 6
- 39
- 70
0
votes
0 answers
Fastest way to apply a Gaussian Blur on a image without Core-Animation
I need to apply a Gaussian Blur to a NSImage.
Since this image changes a lot over the lifetime of the application, the operation should be quick so that the UI stays somewhat responsive.
Unfortunately, I have not found a satisfying solution for this…

IluTov
- 6,807
- 6
- 41
- 103
0
votes
2 answers
Simple NSImage drawing not working as expected
This doesn't do anything:
NSImage* testImage = [[NSImage alloc] initWithSize:NSMakeSize(2.0,2.0)];
[testImage lockFocus];
[[NSImage imageNamed:@"testImage"] drawAtPoint:NSMakePoint(1.0,1.0) fromRect:NSZeroRect operation:NSCompositeCopy…

andyvn22
- 14,696
- 1
- 52
- 74
0
votes
1 answer
NSColor colorWithPatternImage: Vs. NSImage drawInRect:fromRect:operation:fraction:
So I'm trying to set the background of a view as an image, and I read in another thread that to avoid repeating the image, one should use NSImage drawInRect:fromRect:operation:fraction: rather than NSColor colorWithPatternImage: However, when I use…

Matt Cooper
- 2,042
- 27
- 43
0
votes
1 answer
Add a white background to an NSImage that is larger than the original image
I am currently adding a solid white background to an NSImage so that in the case that the image has a transparent background it becomes opaque.
What I would like to be able to do is increase the size of the white background so that it extends out…

dmid
- 483
- 4
- 18
0
votes
1 answer
Saving an NSImage object to file via NSData - losing information
Hello and thanks for reading! I'm trying to write an NSImage object to a file on the disk but am having trouble as some of the 'image properties' are lost when i extract an NSData object from the original NSImage.
To illustrate the problem I have…

Monty
- 117
- 1
- 12
0
votes
2 answers
In Cocoa: How to open image, resize it and save it with a new name
I am trying to open an image with open dialog, resize it and save it with a new name, I found some code in other posts and putting 2 or 3 things togheter I finished having this code, but it doesn't work... here is my code:
…

Blue
- 2,300
- 3
- 21
- 32