|
IJL을 이용해서 JPEG 이미지를 디코딩해서 나온 Bitmap이미지를 아래와 같이 그리려고 하는데
화면에 아무런 변화가 없네요..
아래의 코드에 문제가 있으면 지적해 주세요.. 어디서 문제인 지.. .?? 오리무중... .
repaint or redraw에 문제가 있는 것은 아닌 지 궁금하군요..
감사..
------------------------------------------------------------------------------------------------
if (m_JpgDec.Decoding(GetStream(), GetStreamSize())) {
HDC dc = ::GetWindowDC(Form_Main->Image_Picture); // TImage로 선언된 객체
SBMP * pBmp = m_JpgDec.GetResultBmp();
//Form_Main->Image_Picture->Picture->Bitmap->Assign(pBmp);
result = ::StretchDIBits(
dc, // device context
x, // x-coordinate of upper-left corner of dest. rect.
y, // y-coordinate of upper-left corner of dest. rect.
320, // width of destination rectangle
240, // height of destination rectangle
0, // x-coordinate of upper-left corner of source rect.
0, // y-coordinate of upper-left corner of source rect.
m_JpgDec.GetImageWidth(), // width of source rectangle
m_JpgDec.GetImageHeight(), // height of source rectangle
pBmp->bitstream, // address of bitmap bits
(BITMAPINFO *)&pBmp->header, // address of bitmap data
DIB_RGB_COLORS, // usage
SRCCOPY); // raster operation code
ReleaseDC(Form_Main->Image_Picture, dc);
}
result 값이 0이 나오느데...어떻게 해야 할 지?
|