|
Graphics::TBitmap*s=new Graphics::TBitmap();
s->Loadfromfile(...);
Graphics::TBitmap*d=new Graphics::TBitmap();
d->Whith=s->Width;
d->Height=s->Height;
기타...대입
for(int j=0;j<s->Height;j++){
for(int i=0;i<s->Width;i++){
if(s->Canvas->Pixels[i][j]==RGB(255,255,255)){
d->Canvas->Pixels[i][j]=0;
}else{
d->Canvas->Pixels[i][j]=1;
}
}
}
d->savetofile(..
delete s;
delete d;
속도는 좀 떨어지겠지만...되기는 할듯...
임재권 님이 쓰신 글 :
: 죄송합니다...
:
: 갑자기 빌더로 작업을 해야하는데 막상 할려니 막막해서 이렇게 고수님들의 조언을 부탁드립니다.
:
: bmp 파일을 읽어서 흰색인 부분은 '0'로 표시하고 나머지 부분은 '1'로 표시해서 저장할려구 하는데,
:
: 어떻게 접근해야할지 감이 안 잡히네요...
:
: 조언 부탁드립니다.
|