tfb676
April 21st, 2008, 11:55 AM
Hi guys,
I'm having trouble updating a region of an image (given by a DIB handle (HDIB)) by new pixel values (given by a buffer of DIB-values) . My first approach was to access all pixel values in buffer and to copy them to the HDIB individually. However, this takes too long and does not work with scaling (region in pixel buffer must be streched or shrinked). I know there are a number of GDI-operations and there must be one which can handle my prob. However, I couldn't find an appropriate solution yet. I also tried to paint the HDIB to a memDC, to StretchDIBits() the new vals to the memDC and to save the result in an HDIB again. Unfortunately, haven't had success.
Is there any fast way to perform the required region update in a HDIB?
Thanks in advance,
Rene'
PS: This question might be easy to answer, but my experience in GDI is limited. Thanks for answering anyway!!!
I'm having trouble updating a region of an image (given by a DIB handle (HDIB)) by new pixel values (given by a buffer of DIB-values) . My first approach was to access all pixel values in buffer and to copy them to the HDIB individually. However, this takes too long and does not work with scaling (region in pixel buffer must be streched or shrinked). I know there are a number of GDI-operations and there must be one which can handle my prob. However, I couldn't find an appropriate solution yet. I also tried to paint the HDIB to a memDC, to StretchDIBits() the new vals to the memDC and to save the result in an HDIB again. Unfortunately, haven't had success.
Is there any fast way to perform the required region update in a HDIB?
Thanks in advance,
Rene'
PS: This question might be easy to answer, but my experience in GDI is limited. Thanks for answering anyway!!!