QS about iphone CGImageCreate and data from standard BMP bits? wrong result

hi,everybody:
i have a gdi engine that result in the standard bmp bits stream ,and now i wanna to display it by the CG in iphone , i use it like this:
<code>
// size -> image size // rect -> current view rect //pBits -> the BITMAPINFO image bits stream
long imgSizePerRow = ((long)(24 * size.width + 31) / 32) * 4;
CGDataProviderRef providerRef = CGDataProviderCreateWithData(NULL, pBits, imgSizePerRow * size.height, NULL);
CGColorSpaceRef colorSpaceRef = CGColorSpaceCreateDeviceRGB();//
CGImageRef imageRef = CGImageCreate(size.width, size.height,
8, 24, //bitsPerComponent //bitsPerPixel
imgSizePerRow,
colorSpaceRef, kCGBitmapByteOrderDefault , providerRef,
NULL, YES, kCGRenderingIntentDefault);
CGContextDrawImage(context, rect, imageRef);
CGImageRelease(imageRef);
CGColorSpaceRelease(colorSpaceRef);
CGDataProviderRelease(providerRef);
</code>
attention: i check the row pixel fit to the times of 4
My gdi generate the bits stream , in this case , R8G8B8 format , no alpha channel ,i use this for CGDataProviderRef and draw the CGImage to my view. it is strange that the image's color seems change, yet the whole shape seems ok , i save the bits stream by BITMAP FORMAT to a file before, and make a contrast , everything seems ok just the whole color space.

**** it , i got the wrong sequence of pixel sequcence, the standard BITMAP stream is B-G-R,
YET the mac's core Image is like B-G-R . THAT'S OK !

Similar Messages

  • I live in uae and want purchase want info about iphone 4s and 5 from uk store there prrice and made of ect how i can take these info and from where ?

    good day i live in uae i need prices of iphone 4s and 5 all availabe gb and made off and delivery process pls can you help me ?

    Without a confirmed address and credit card from the UK, you can not order from the UK store. Apple will not ship out of country.

  • Question about iphone 4 and data plan..

    I have the 3GS with unlimited data.
    I am getting the iphone 4.
    I will be giving 3GS to wife.
    Will the unlimited data plan only stay for the 3GS?
    Or can it be transferred to the iphone 4?
    Or can I get unlimited plan for both since I'm an existing customer?
    Thanks!!

    You can continue with your unlimited plan on the new phone. Your wife will have to choose one of the new data plans for the 3GS.

  • HT201274 hello i have just deleted content and data from my iphone now my phone doesnt show anything

    hello i have just deleted my iphone content and data from my phone. now my phone just shows apple logo with bars it does not log into windows. what do i have to do to get my iphone working

    Try Here  >  http://support.apple.com/kb/HT1808
    Be sure to follow All the Steps...

  • My iPhone was stolen. I just got a new one and am trying to backup my contacts and data from iCloud. How do you do that?

    my iPhone was stolen. I just got a new one and am trying to backup my contacts and data from iCloud. How do you do that?

    If your backup is in iCloud, and your new iPhone is already set up, go to Settings>General>Reset, tap Erase All Content and Settings, then go throught the setup screens on the iPhone and when given the option, choose Restore from iCloud Backup and follow the prompts.  (If it isn't set up yet, just choose this option when setting it up.)
    Be sure your iPhone it connected to wifi and your charger while it is restoring the backup.

  • How to Fetch Data From Standard Table MARA and Display using BOPF ?

    Hello All,
    In BOPF creation of Quey to a node fetches data from the Data Base Table attached to that Node,
    But in my requirement I have to fetch data Present in a Standard table and Display it in the FPM List Using FBI.
    **  Can we Fetch the data From Standard Table and fill the Node in BOPF, Is this possible as the standard Table do not contain KEY field which BOPF uses for Data Fetching ?
    Kindly share your Idea's .
    Thanks in Adv.

    Hi Dhivya,
    Thanks For your Response.
    In my Requirement I want to make ROOT Node as Transient Node.
    When I create a Sub Node to a Root Node, I am able to get this option to make this sub node as a Transient Node .
    By selecting   'Standard<-->Extended' option in the Menu item 'GoTo' I am able to get this Transient Node check box field for the Sub Nodes.
    I want to make a ROOT Node as a Transient Node.
    (Which Version you are using, and which transaction you are using to create BO . we are using BOBX Transaction, Version Ehp 6 )
    Kindly Guide me .
    Thanks,
    Kranthi Kumar.

  • HT1688 how do I transfer apps, messaging, and data from my old iphone to my new iphone

    how do I transfer apps, messaging, and data from my old iphone to my new iphone

    firstly sync your old iphone,then connect your new iphone and sync from backup.

  • Bought a new iPhone 6 and synced from iTunes but vibration doesn't work.

    Bought a new iPhone 6 and synced from iTunes but vibration doesn't work. I did the reset option using side and home buttons but in vain. Please don't tell me to set up a new device coz its gonna be a hassle restoring apps, emails, contacs...etc.

    Try to reset the phone by holding the sleep and home button for about 10sec, until the Apple logo comes back again. You will not lose any data by resetting, but it can cure some glitches.
    If this does not help, setting it up as new device would be the next step:
    How to erase your iOS device and then set it up as a new device or restore it from backups

  • Can I restore settings, apps and data from an external hard drive to new Macbook Pro?

    I recently lost my Macbook Pro to water damage.  It was about 3 years old and tuned for comfort.  Unfortunately, my most recent backup is at least 3 months old.  I purchased a new MacBook Pro and I'm wondering what my options are for migrating my settings, apps and data from the old hard drive to the new MacBook Pro?  I have a USB drive bay that I plan to attach to the new MBP to gain access to the old hard drive.  Someone suggested Migration Assistant but my research hasn't turned up any information about migrating data from an external drive.
    Any help would be greatly appreciated.

    THANKS!  I guess my research wasn't THAT thorough.   I booted with the external drive attached and setup immediately gave me the option to setup using Migration Assistant.  It was a little slow via USB (2+ hours) but it was nothing compared to the time it would have taken to do it manually.  My new 15" MBP looks exactly like my old 13" MBP.  AWESOME!!!
    Thanks again!

  • Copying database objects and data from one server database to another server database in AG group

    Hi,
    I am still trying to wrap my head around sql clusters and AGs and I have a project that requires I take a vendor's database and restore it weekly so its available on the production server which is clustered.
    The vendor's database on the cluster is in an AG group and encrypted.
    Right now, I plan to restore the database on a sql staging server and use the SSIS Transfer SQL Server Objects Task to copy the table structure and data from Stage to the Production database of same name and I would first drop the objects in production
    database using the same task.
    I am concerned that this might cause issues with the passive cluster due to "logging" from active to passive. The database is about 260 MBs and I am not sure how many tables.
    Has anyone run into this type of scenario before or have a better solution?
    Thanks
    Sue

    IF I understand anything about clustered sql and logging, the sql server should take the log file and recreate the same scenario on the passive side of the cluster.
    Is that correct?
    Hi Sue,
    Yes, for AlwaysOn Availability Group, the transaction log is basically replayed from the primary to all of the secondary's.
    Besides, from my point of view, as we cannot directly restore a database that is part of an Availability Group, it is a good way using SSIS task to drop and recreate all tables then transfer data from the restored database to the primary replica. Schema changes
    and data changes will also happen on the secondary  replica.
    There are some similar links for your reference.
    http://dba.stackexchange.com/questions/21404/do-schema-changes-break-sql-server-2012-alwayson-or-are-they-handled-transpare
    http://blogs.msdn.com/b/sqlgardner/archive/2012/08/28/sql-2012-alwayson-and-backups-part-3-restore.aspx
    Thanks,
    Lydia Zhang
    If you have any feedback on our support, please click
    here.
    Lydia Zhang
    TechNet Community Support

  • What does clearing cookies and data from iPad 4 mean?

    What does clearing cookies and data from iPad 4 mean?

    http://ipad.about.com/od/ipad_basics/ss/How-To-Clear-Cookies-And-Web-History-In- The-iPad-Safari-Browser.htm
     Cheers, Tom

  • HT5163 I brought both an iPhone 5 and 3Gs from the US to Saudi Arabia.  I want to keep my iPhone 5 on the US conrtact but want to convert my iPhone 3Gs to a local phone.  Is it a simple matter of changing out the SIM card?

    I brought both an iPhone 5 and 3Gs from the US to Saudi Arabia.  I want to keep the iPhone 5 under a contract in the US.  However, I want to use my iPhone 3Gs as a local phone.  Is it as simple as changing the SIM card in the 3Gs to use as a local phone.  Will I be able to receive emails on the 3Gs with a local SIM card?

    Check this article about how to get your phone unlocked, not every provider offers unlocking.
    iPhone: About unlocking

  • How do I transfer files and data from my Samsung Galaxy tab 2 to my Macbook Air?

    How do I transfer files and data from my Samsung Galaxy tab 2 to my Macbook Air? The Macbook does not even recognize the device. I get an error message. I follow the instructions on the message, which tells me to install "Kies" and Android file transfer. This does not help. What do I do?

    See:
    iOS: Transferring information from your current iPhone, iPad, or iPod touch to a new device

  • I transferred about 400 gigs of data from my MacBook Pro to my new iMac using Migration Assistant, but it doesn't show on Finder. How can I locate my data?

    I transferred about 400 gigs of data from my MacBook Pro to my new iMac using Migration Assistant, but can't find any of my data on Finder. I'm thinking that the data got transferred but not cataloged. Finder shows about 400 gigs of my hard drive being used, but the files it shows don't come anywhere close to 400 gigs. How can I find out what is really on the hard drive and how can I access my MacBook files I transferred?

    I suggest that you start over, boot into Internet recovery mode, launch Disk Utility, erase and reformat the HD with one partition and GUID option, quit Disk Utility, restore the OS, and on first boot, use the Setup Assistant to migrate from the MacBook, following the steps in Pondini's Setup New Mac guide. If that doesn't solve your problem, contact Apple's Support. If they recommend the same steps, I'd opt to return the machine and get another (you can do that the first 14 days you own it, no questions asked).
    27" i7 iMac (Mid 2011) refurb, OS X Yo (10.10.1), Mavs, ML & SL, G4 450 MP w/10.5 & 9.2.2

  • Time and date from an atomic clock

    Hi,
    I want to make an application in Labview 6i which gets the time and date
    from an atomic clock (this is a must!). What is the easiest way to do this?
    Regards,
    Sergio

    Sergio Cruz wrote:
    >
    > Hi,
    >
    > I want to make an application in Labview 6i which gets the time and date
    > from an atomic clock (this is a must!). What is the easiest way to do this?
    You cannot maintain atomic clock accuracy using software on a PC. Think
    about it. You're running on a PC whose clock may gain milliseconds per
    day if you're lucky, probably seconds / day.
    Out of the box, Windows can do things (like downloading Windows updates)
    which can delay operations for seconds.
    It can take several milliseconds to update an indicator that shows the
    time, if that is what you plan to do.
    I can see some approaches:
    * If you can accept moderate accuracy of about 1-10 ms run software such
    as Dimension 4 from www.thinkman.com.
    That can be set up to run ever
    y 15 minutes, automatically synchronizing
    your PC to Internet time servers.
    You don't need to control it from LabVIEW; if you had to, you could run
    the executable C:\Program Files\D4\D4.exe using System Exec.
    * You haven't described what you are doing. If you want more accurate
    time keeping, then you might get a timekeeping board to plug into your
    PC and control any other hardware you may be using.
    Search the Web for "IRIG board".
    Good luck, Mark

Maybe you are looking for

  • How do I get just the tracks I want!

    I'm still new to sound track and I'm having some problems. I have been given a voice over recording on cd and it has several takes on it. In soundtrack I have imported these clips and put tighter the version of the voice over I want to use. To make t

  • Add javascript library in .java using JavascriptContext.addJavascriptCall

    Hi everyone, I'd like to know if someone can give me a hand with this problem. I want to add a javascript library to my project, well normally you add it into the head of the jsp like: <ice:outputHead id="outputHead1">                 <ice:outputStyl

  • The whole darned screen moves when I move the cursor.  Help!!!!!!

    After a full-on ten-fingered assault on my keyboard by a three-year-old, my Screen Display area seems to have outgrown the display. Every time I move the mouse the display moves from side o side to accommodate. It really stinks, since I can't see wha

  • Where are the discs in the MacBook Pro box?

    I just purchased a new MacBook Pro pre-loaded with Lion this weekend at Best Buy. The box contains the MacBook, a couple of power cords thingys, a brief instructional manual and other printed ephemera, and that's it. Doesn't this MacBook come with th

  • Query Execution problem in SAP BI Portal

    Dear all I have a query which I want to execute in BI portal. For this , I opened up BEx Query Designer and from there pressed the "Execute" button which opened the login screen in my browser.  I successfully logged in and provided inputs for the que