hsfoki.blogg.se

Stretchblt vs copyimage
Stretchblt vs copyimage











stretchblt vs copyimage

Select bitmap into a memoryDC so we can use it. HBITMAP hbm = (HBITMAP) ::LoadImage( NULL, a_lpszImageName, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE | LR_CREATEDIBSECTION)

stretchblt vs copyimage

Here is the code I use to pull in the file and display it, minus error checking for clarity.

stretchblt vs copyimage

I just opened the image in Photoshop and remapped it to 8 colors and shunk it, and except for the pink streaks, it looks just like this thumbnail version I'm seeing in my app. Actually, now that I type this it's ringing a bell. It's like, instead of her having rosy cheeks nicely "made up", it's like her cheek is chunks of tan, chunks of a ligher tan, chunks of pink. (I could probably use Blt() for the fullsize, but I'm only pointing this out since my thumbnail is created with the same code)

Stretchblt vs copyimage full size#

When I show it full size using StretchBlt() it looks perfect, exactly as it does when I load it in Photoshop. Large areas of the image look as they should pretty much, but the smaller version looks, well, dithered is probably the closest word. The picture itself is pretty much correct, size, placement and orientation are all correct. It's hard to explain w/o seeing but I'll try. Functionally, everything is working, my problem is that the thumbnails are corrupt. I'm loading a full size, 24bit color bitmap from a file, and attempting to display it in a reduced size (thumbnail) - when I click it, it loads full-size into a direct draw surface.













Stretchblt vs copyimage