Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 11-13-2009, 01:46 PM   #1 (permalink)
Registered Member
 
Join Date: Nov 2009
Posts: 3
Default Using CGImageCreate with an indexedColorSpace adds map to each pixel row

I am using a color map lookup table in my indexed color space. When I use CGImageCreate to create the CGImage, then create a UIImage, I get an extra COLUMN of pixels in the first 32 bits (4 pixels) of every pixel row... which causes the image to shift right by 4 pixels. It looks like the color map is being written to the first 32 bits of every row... then the display system displays these extra pixels! Am I missing something or doing something wrong. I've researched the web and documentation and cannot configure it out...

The color map works perfectly, but I do not want to see the color map content as displayed pixels.

Here is the basic setup:

CGColorSpaceRef indexedColorSpace = CGColorSpaceCreateIndexed(rgbColorSpace, 255, lut);

cgImage = CGImageCreate( width,
height,
bitsPerComponent,
bitsPerPixel,
bytesPerRow,
indexedColorSpace,
bitmapInfo,
provider,
NULL,
NO,
kCGRenderingIntentDefault
);

UIImage *image = [[UIImage alloc] initWithCGImage:cgImage];

The resulting image is color correct, but a 4pixel line in the left side of the image which shifts the entire image 4 pixels to the right.

Any help would be appreciated.
cavalleydude is offline   Reply With Quote
Reply

Bookmarks

Tags
cgimage, colorspace, indexed, uiimage

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 273
25 members and 248 guests
ADY, Bertrand21, Dani77, Dattee, fkmtc, HemiMG, iDifferent, IphoneSdk, jakerocheleau, JasonR, jimbo, macquitzon216, MACralik, mer10, NSeven, prchn4christ, Rudy, sacha1996, silverwiz, sneaky, spiderguy84, Sunny46, theone8one
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,885
Threads: 89,230
Posts: 380,767
Top Poster: BrianSlick (7,129)
Welcome to our newest member, bookesp
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 03:04 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0