Questions tagged [nsimagerep]

26 questions
1
vote
1 answer

NSImageRep wrong resolution?

MacOS 10.7.4 comes with new icons having image reps at 144 DPI. The bad thing is that when I load one of these icons in a NSImage I only get reps having a size of 512px. I mean: I load a 1024px/144dpi icns file in a NSImage and then I ask every…
user732274
  • 1,069
  • 1
  • 12
  • 28
0
votes
1 answer

Create and write paletted RGBA PNG using NSImage

I'm trying to create paletted PNG image (8-bit per pixel) that uses RGBA palette (32-bit per palette entry) using Cocoa framework*. I've tried few combinations for [NSBitmapImageRep initWithBitmapDataPlanes:…] method. It seems to create appropriate…
Kornel
  • 97,764
  • 37
  • 219
  • 309
0
votes
1 answer

NSBitmapImageRep load image

i'm quite new to objective C and followed some instructions i found, but at the moment i got stuck. i am trying to load an image with the following code: NSBitmapImageRep *img; img = [NSBitmapImageRep…
Rolf
  • 85
  • 1
  • 6
0
votes
0 answers

Xcode 7 indicating heap buffer overflow in NSBitmapImageRep - bitmapData

Just found an issue running my app through the new Address Sanitizer feature in Xcode 7 that I can't quite make any sense of: I'm attempting to initialize a medium-sized (588x375) texture from an NSImage like this NSImage *texture = [[NSBundle…
ATV
  • 4,116
  • 3
  • 23
  • 42
0
votes
1 answer

Making IKImageView aware of my custom NSImageRep

In my application, I’ve written a custom NSImageRep to handle a proprietary image format. The application’s primary view is an IKImageView, which I intend to load the images I’ve made the custom NSImageRep for into for viewing and manipulation. If I…
John Wells
  • 1,139
  • 1
  • 10
  • 27
0
votes
0 answers

Colored Artifacts while transforming PDF to NSImageRep (png)

I want to convert different PDF pages to an png. After that I iterate through all pixels to search colored pixel. The main goal is to get the colored pages of the PDF. For the most pages it runs great. But on some pages I have colored artifacts in…
Thomas D.
  • 66
  • 5
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 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
2 answers

NSBitmapImageRep and multi-page TIFFs

I've got a program that can open TIFF documents and display them. I'm using setFlipped:YES. If I'm just dealing with single page image files, I can do [image setFlipped: YES]; and that, in addition to the view being flipped, seems to draw the…
Brian Postow
  • 11,709
  • 17
  • 81
  • 125
0
votes
1 answer

CGImage APIs and ICO files

I'm experiencing something that seems like a bug: if I create ICO files using the CGImage APIs I get the first rep (256px) with a color profile, while all the other reps don't have a color profile (and in fact they look much brighter). I also tried…
user732274
  • 1,069
  • 1
  • 12
  • 28
-1
votes
1 answer

How to generate NSImage with specific resolution and specific size in mm

I am new to objective-c and cocoa programming. I am trying to generate image which will be 128mm in height and 128mm in width with 300 DPI resolution. NSString *image = [[NSImage alloc] initWithSize:NSMakeSize(1512, 756)]; In above line of code…
A2212007
  • 11
  • 4
1
2