|
// *********************************************************
// 新規イメージ作成
// 戻り値 : true 成功, false 失敗
// *********************************************************
BOOL LboxGd::CreateJpeg( int w, int h )
{
this->Type = "JPEG";
return LboxGd::Create( w, h );
}
BOOL LboxGd::CreatePng( int w, int h )
{
this->Type = "PNG";
return LboxGd::Create( w, h );
}
BOOL LboxGd::Create( int w, int h )
{
if ( this->lib == NULL ) {
this->SetLibLoadErrorMessage();
return false;
}
LPFUNC_gdImageCreateTrueColor Dll_gdImageCreateTrueColor;
Dll_gdImageCreateTrueColor =
(LPFUNC_gdImageCreateTrueColor)GetProcAddress(
lib, "gdImageCreateTrueColor@8"
);
if ( Dll_gdImageCreateTrueColor == NULL ) {
this->SetFuncLoadErrorMessage();
return false;
}
if ( this->gd != NULL ) {
this->Destroy();
}
gdImagePtr im;
im = Dll_gdImageCreateTrueColor(
w, h
);
this->gd = (void *)im;
return true;
}
| |