StretchDIBits failed, sometimes it didn't draw anything,
1 answer
It is possible that StretchDIBits expands the source image into a temporary bitmap the same size as the target bitmap and then copies the temporary address to the destination. Thus, even if you have enough memory to generate the bitmap (140 MB) prior to calling StretchDIBits, your system does not have the additional 140 MB to accommodate the temporary bitmap.
+1
source to share