locked
Creating IWicBitmaprenderTarget from Iwicbitmap

    Question

  • I created a wicBitmap from data present in memory

    hr=pFactory->CreateBitmapFromMemory(512,512,GUID_WICPixelFormat8bppGray,512,512*512,ptr,&Bitmap1);

    Now i wanted to create a render target to draw on the bitmap so i called

     hr=pFactory->CreateBitmapFromMemory(512,512,GUID_WICPixelFormat8bppGray,512,512*512,ptr,&Bitmap1);

    but it returns an error 

    Wednesday, September 3, 2014 11:35 AM

Answers

  • Hi ankushsharma2805,

    What's the difference? The code you provide looks same.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, September 4, 2014 6:48 AM
    Moderator

All replies

  • Hi ankushsharma2805,

    What's the difference? The code you provide looks same.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, September 4, 2014 6:48 AM
    Moderator
  • James thank you for replying i made mistake while psoting code.Anuway i found solution

    Anyone can please help me in these matter

    I am assigned a task 2 days back to take a 16 bit grayscale image in raw  pixel data..create annotations on top of that and again get the new image data in buffer.Can u please guide through steps.

    I decided to use Direct2d for these.So i Initialy started with 8 bit grayscale image.i created a wicbitmap using data then i created a render target on top of that then i draw something and later i read those data back into buffer

    It was workig fine.Now i wanted to do it with 16 bit grayscale data..and icreated a wicbitmap.so what rendertarget should i choose so itsupports 16 bit data..

    Thursday, September 4, 2014 4:04 PM