Questions tagged [nsimage]

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

681 questions
0
votes
3 answers

NSImage readFromData problem

I am trying to make a simple document-based cocoa application that can save and load images in pdf files. For the save part, I am using - (NSData *)dataOfType:(NSString *)typeName error:(NSError **)outError { return [imageView…
ccy
  • 13
  • 4
0
votes
2 answers

Image size different from dimensions

I scanned an image (.tiff) with Macintosh millions of colors which means 24 bits per pixel. The scanned image that I am getting has the following attributes: size = 330KB and dimensions = 348 * 580 pixels. Since, there are 24 bits per pixel, the…
Sankalp
  • 2,796
  • 3
  • 30
  • 43
0
votes
1 answer

Image size anomaly

I have an image in the form of an NSURL as input. I converted this url to NSImage and then to NSData from which I could get CGImageRef. This imageRef helped me extracting the raw data information from the image such as the height, width,…
Sankalp
  • 2,796
  • 3
  • 30
  • 43
0
votes
1 answer

UIImage and NSImage report different image dimensions

I have the following code on Mac OSX to load an image: NSImage *baseImage = [NSImage imageNamed:[NSString stringWithCString:file.getFilename().c_str() encoding:NSUTF8StringEncoding]]; And the following code on iOS to load an image: UIImage*…
tjgrant
  • 438
  • 4
  • 18
0
votes
1 answer

NSTableView with images

I have NSTableView with 3 tabs. Now, I want an image inside every tab, how can i do ? I must use NSImage with position, so ? NSImage *theImage; theImage = [NSImage imageNamed@"myImage.png"];
0
votes
1 answer

How to get UIimage size dependent on screen resolution

In my application while user try to upload image, I want image size based on the screen resolution. For example If image size is 9690 X 4400 then it should return its size depend on screen resolution instead of actual size. For mac application (OSX)…
Nikunj
  • 987
  • 11
  • 25
0
votes
1 answer

Retina / non retina : Drawing icons

My app's menu extra icon should reflect meaningful information to the user. However, there are too many cases to draw icons beforehand. It would be easier to programatically prepare the icon on the fly. What would be the best way to get the size of…
user2205231
0
votes
1 answer

Retina @2x high-resolution graphics wrongly used on standard display

It appears that some images are incorrectly drawn, using their high-resolution equivalent, while others are fine. why is that ?
Nightbirdsevolve
  • 562
  • 5
  • 15
0
votes
1 answer

How to compress jpeg image with Cocoa?

I have an jpeg image and I want to be able to incrementally compress it using Cocoa/Core Image/Core Graphics. For example, I have A.jpg (3MB), I compress A and get B.jpg (1MB), compress B and get C.jpg (400KB), and so on till the image can't be…
phi
  • 1,513
  • 1
  • 15
  • 34
0
votes
1 answer

NSImage property always return null?

I have a custom class called movie. It is simple with three properties: .h @interface WTAMovie : NSObject @property (strong, nonatomic) NSImage *theImage; @property (strong, nonatomic) NSString *theTittle; @property (strong, nonatomic) NSString…
Tommy Alexander
  • 701
  • 1
  • 7
  • 17
0
votes
2 answers

Stretching an NSImage to make iMessage-like bubble

I'm creating messenger, I have bubble: I want to stretch it to something like this to add text: How can I do it? Thanks.
egor.zhdan
  • 4,555
  • 6
  • 39
  • 53
0
votes
1 answer

NSRectFill draws twice as big on retina MBP

I am trying to draw and save a simple image, but it is ultimately saved twice as big on a MBP RD device: NSImage* image = [[NSImage alloc] initWithSize:size]; [image lockFocus]; [[NSColor blueColor] set]; NSRectFill(CGRectMake(0, 0, 100,…
Mazyod
  • 22,319
  • 10
  • 92
  • 157
0
votes
0 answers

Sandboxing Application: Partially Failing to Reading XML Plist

I have an NSMutableArray of NSMutableDictionary. The application allows the user to save the array as an XML project file with plist. Everything works fine before the application is sandboxed. The dictionary contains keys to store file names,…
El Tomato
  • 6,479
  • 6
  • 46
  • 75
0
votes
1 answer

How to save a image from web using its own filename

i'm having a array of web urls redirecting images. Is it possible to download images directly and save it using its default file name.
user23790
  • 563
  • 3
  • 21
0
votes
2 answers

Cocoa - problem with this code using NSBundle

It was suggested that I use this line of code to call an image from my resources folder/project bundle. I also see it being used exactly like this on many different website tutorials. NSBundle *mb=[NSBundle mainBundle]; NSString *fp=[mb…
Brian
  • 63
  • 6