read/write BMP,JPG,GIF file ?
-
Can you help me or show me where have source code to do this I want read/write BMP,JPG,GIF file more detail: I will capture all screen .....after then save it in BMP,JPG,GIF format thank you very much :):rose:
-
Can you help me or show me where have source code to do this I want read/write BMP,JPG,GIF file more detail: I will capture all screen .....after then save it in BMP,JPG,GIF format thank you very much :):rose:
-
Chris, I'm using your JpegFile[^] class - excellent! - and have recently been forced to stretch blit
HBITMAP
s created from Jpeg files. However, this results in skewed images. Plain blitting works fine, but since stretching skewes the image, I wonder if there might be data alignment issues. I create theHBITMAP
like this (only a snippet - allocated memory is deleted, I promise...):UINT width, height;
LPBYTE pData = JpegFile::JpegFileToRGB(filename, &width, &height);
JpegFile::BGRFromRGB(pData, width, height);
UINT widthBytes;
LPBYTE pDataAligned = JpegFile::MakeDwordAlignedBuf(pData, width, height, &widthBytes);
HBITMAP hBmp = ::CreateBitmap(width, height, 1, 24, (PVOID)pDataAligned);Should I create a DIB section instead? If so, why? Can you see something else, which is completely and utterly crazy? Thanks for any input! -- Human beings, who are almost unique in having the ability
to learn from the experience of others, are also remarkable
for their apparent disinclination to do so. (Douglas Adams) -
Chris, I'm using your JpegFile[^] class - excellent! - and have recently been forced to stretch blit
HBITMAP
s created from Jpeg files. However, this results in skewed images. Plain blitting works fine, but since stretching skewes the image, I wonder if there might be data alignment issues. I create theHBITMAP
like this (only a snippet - allocated memory is deleted, I promise...):UINT width, height;
LPBYTE pData = JpegFile::JpegFileToRGB(filename, &width, &height);
JpegFile::BGRFromRGB(pData, width, height);
UINT widthBytes;
LPBYTE pDataAligned = JpegFile::MakeDwordAlignedBuf(pData, width, height, &widthBytes);
HBITMAP hBmp = ::CreateBitmap(width, height, 1, 24, (PVOID)pDataAligned);Should I create a DIB section instead? If so, why? Can you see something else, which is completely and utterly crazy? Thanks for any input! -- Human beings, who are almost unique in having the ability
to learn from the experience of others, are also remarkable
for their apparent disinclination to do so. (Douglas Adams)the docs for CreateBitmap say that the image has to be WORD-aligned, not DWORD-aligned. so, that could be a problem. i typically use CreateDIBitmap or CreateDIBSection. have you tried either of those? -c ImgSource | CheeseWeasle
-
the docs for CreateBitmap say that the image has to be WORD-aligned, not DWORD-aligned. so, that could be a problem. i typically use CreateDIBitmap or CreateDIBSection. have you tried either of those? -c ImgSource | CheeseWeasle
As I'm on Windows CE, CreateDIBitmap isn't an option, but CreateDIBSection() solved it. See an elaborate scheme in another thread[^]. Thanks! -- Human beings, who are almost unique in having the ability
to learn from the experience of others, are also remarkable
for their apparent disinclination to do so. (Douglas Adams)