none
SharpDX direct2d Make DeviceContex to a png? RRS feed

  • Question

  • Hi, i been working on a Directx Paint program. Currently im just trying to save a devicecontex to a Png file or something of that kind.

    Is there anyway to make a code like this?

    BitMap Content = devicecontext.ToBitMap();

    I been looking around on Google for couple of days but i haven't found any good example that uses C#.


    • Edited by KoffeSwed Thursday, December 7, 2017 5:40 PM Bug
    • Moved by Fei Hu Sunday, December 24, 2017 8:12 AM No related to C#
    Thursday, December 7, 2017 5:39 PM

All replies

  • Hello KoffeSwed,

    What is devicecontext's type, if the devicecontext doesn't exist ToBitMap method and you have already got the data from image. why not convert it to png file manually.

    Best regards,

    Neil Hu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, December 11, 2017 10:54 AM