Howdy, how can i change the Screensize of a Image ? Lets say from 800x600 Pixels to 320x240. Any1 who work with Images here and like to tell me how to convert from True Color to only 256 ? Many Thanks !
Hello. I think you could use StretchBlt. It will stretch the image. BOOL StretchBlt( HDC hdcDest, // handle to destination DC int nXOriginDest, // x-coord of destination upper-left corner int nYOriginDest, // y-coord of destination upper-left corner int nWidthDest, // width of destination rectangle int nHeightDest, // height of destination rectangle HDC hdcSrc, // handle to source DC int nXOriginSrc, // x-coord of source upper-left corner int nYOriginSrc, // y-coord of source upper-left corner int nWidthSrc, // width of source rectangle int nHeightSrc, // height of source rectangle DWORD dwRop // raster operation code ); If you don't want to stretch your pic but just have a part of it, i think you could use SetBitmapDimensionEx. BOOL SetBitmapDimensionEx( HBITMAP hBitmap, // handle to bitmap int nWidth, // bitmap width in .01-mm units int nHeight, // bitmap height in .01-mm units LPSIZE lpSize // original dimensions ); Hope this helps. Happy coding.
Hello, thank you for your answer :-) im admin of a gfx homepage and it takes a lot time to convert every week the images i got from my visitors. so i want to code a small tool who convert all bitmaps in a selected directory to 320x240 pixel and 16colors. i think i have to load the bitmap and save it with new size,but how to do ??? i search the web for a sample,but i wonder why i cant found information about working with bitmaps in asm. maybe this is ti difficult to handle and others dont use this. i see,its a long way to finsish my tool. Thanks !