Render Image to Windows device context
Render Image to Windows device context
How do I render an Magick++ Image to a Windows device context so that an image appears in a window ?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Render Image to Windows device context
You need to call a bunch of Windows functions, which are outside the scope of this forum. In a nutshell: CreateCompatibleDC() and CreateCompatibleBitmap(), then looping through y and x SetPixel(), then finally BitBlt().
snibgo's IM pages: im.snibgo.com
Re: Render Image to Windows device context
I did find how to do it from the IMDisplay and NTMagick example code. It would be nice if the Magick++ API added the techniques found in those examples to its API as a member function of the Image class specific Windows programming.