"Inconsistent set of values to create NSBitmapImageRep" Help!
*grumbles about lack of experience in Cocoa*
I am simply trying to create an NSBitmapImageRep with a width of (int)widthPxl and a height of (int)heightPxl and a type of NSJPEGFileType. Here's my code:
This is giving me "Inconsistent set of values to create NSBitmapImageRep" and I have checked widthPxl and heightPxl. What am I doing wrong? Is there an easier way to create an NSBitmapImageRep with those three parameters? (width, height, jpg)
I am simply trying to create an NSBitmapImageRep with a width of (int)widthPxl and a height of (int)heightPxl and a type of NSJPEGFileType. Here's my code:
Code:
NSBitmapImageRep *tempBitmapImageRep;
tempBitmapImageRep=[[NSBitmapImageRep alloc]
initWithBitmapDataPlanes:NULL
pixelsWide:widthPxl
pixelsHigh:heightPxl
bitsPerSample:8
samplesPerPixel:3
hasAlpha:NO
isPlanar:YES
colorSpaceName:NSDeviceRGBColorSpace
bitmapFormat:NSJPEGFileType
bytesPerRow:0
bitsPerPixel:0];This is giving me "Inconsistent set of values to create NSBitmapImageRep" and I have checked widthPxl and heightPxl. What am I doing wrong? Is there an easier way to create an NSBitmapImageRep with those three parameters? (width, height, jpg)
a) NSJPEGFileType is not a valid argument for bitmapFormat:, read the docs.
b) even if it was, I doubt that you'd be allowed to have a planar image with it, nor that you'd actually want one.
what are you really trying to achieve?
b) even if it was, I doubt that you'd be allowed to have a planar image with it, nor that you'd actually want one.
what are you really trying to achieve?
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| passing values from vertex to fragment shader | Sumaleth | 6 | 8,630 |
Feb 18, 2011 01:54 AM Last Post: Holmes |
|
| Changing Pixel Values using CG | LIPH700 | 1 | 3,754 |
Nov 25, 2010 03:17 PM Last Post: SethWillits |
|
| Strange OpenGl or NSBitmapImageRep error | magnusrw | 4 | 2,805 |
Apr 24, 2009 11:13 AM Last Post: magnusrw |
|
| NSBitmapImageRep/CIImage questions | Caveman | 6 | 5,068 |
Sep 6, 2008 04:37 PM Last Post: ThemsAllTook |
|
| Copying between NSBitmapImageRep objects | Emehr | 3 | 3,612 |
Oct 31, 2007 01:27 PM Last Post: Emehr |
|

