오라클에 LONG RAW 타입으로 저장되어있는 이미지들이 있는데
Image32를 써서 화면에 출력하려고합니다.
BMP파일을 DB에 올리고 읽는것은 잘 돌아가는데
JPG파일일 경우는 에러가 나네요. 비트맵파일이 아니라고 에러가 납니다.
//--------------------------------------------------------
#include
...........중략
TPicture::RegisterFileFormat(__classid(TPicture), "jpg", "JPEG Files",__classid(TJPEGImage));
..........중략
TMemoryStream *Stream = new TMemoryStream ();
Stream = (TMemoryStream*)ADOQuery1->CreateBlobStream(ADOQuery1->FieldByName("SAJIN"), bmRead);
Image321->Bitmap->LoadFromStream(Stream);
//--------------------------------------------------------
출력하는 부분 소스인데..
DB에 올려져있는 파일은 BMP인지 JPG인지 모르기때문에 동시에 출력하는 방법이 없나요?
|