Re: bitmap from clipboard to file

"umeca74" <[email protected]>
Newsgroups gmane.comp.windows.wtl
Message-ID <[email protected]>
--- In [email protected], "Jim Barry" <j.barry@...> wrote:
> 
> Hi Nikos. It's probably best to avoid GlobalSize, as it may return a
> larger value than the size that was originally passed to GlobalAlloc

that's true, i played with it and it was a few bytes extra than the actual biSizeImage, but using the accurate size didn't make any difference


> actual problem is that for a 32-bit screen capture, biCompression
> is set to BI_BITFIELDS, therefore the bmiColors array that follows
> the header contains three DWORD bit-masks, meaning that the pixel
> data starts 12 bytes after the bfOffBits value that you calculated

that was spot on as usual! I assumed there was no palette for high color bitmaps. Thanks Jim!

(how come ALL samples in the documentation are mostly wrong and don't mention this age old issue?)



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/wtl/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/wtl/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[email protected] 
    mailto:[email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.