Page 1 of 1

Drop Shadow in ver 2.67

Posted: Thu Feb 22, 2007 12:30 am
by linojr99
:? I've tried using the new drop shadow feature and found I was unable to get the black shadow to appear. The white border is created but the black shadow is missing.
Is there documentation avaliable showing how to show the black color or any other color?

Re: Drop Shadow in ver 2.67

Posted: Thu Feb 22, 2007 5:07 pm
by xnview
linojr99 wrote::? I've tried using the new drop shadow feature and found I was unable to get the black shadow to appear. The white border is created but the black shadow is missing.
Is there documentation avaliable showing how to show the black color or any other color?
Could you tell me which parameters do you use?

GFL_SDK ver 2.67 Drop shadow problem

Posted: Thu Feb 22, 2007 8:37 pm
by linojr99
private: int _DropShadow(HBITMAP & src, HBITMAP & dest, int size, int depth, int keep_size);
public: int DropShadow(Image & src, Image *& dest, int size, int depth, int keep_size);
public: int DropShadowF(String * src, String * dest, int size, int depth, int keep_size);

/////////////////////////////////////////////////////////////////////////////////////
// DropShadow
//
int Converter::Effects::_DropShadow(HBITMAP & src, HBITMAP & dest, int size, int depth, int keep_size)
{
int error;
GFL_BITMAP * src_bmp = NULL;
GFL_BITMAP * dest_bmp = NULL;

error=gflConvertDDBIntoBitmap(src,&src_bmp);
if(error) return error;
error=gflDropShadow(src_bmp,&dest_bmp,size,depth,keep_size);
if(error) return error;
error=gflConvertBitmapIntoDDB(dest_bmp,&dest);
FreeGFLBitmap(src_bmp);
FreeGFLBitmap(dest_bmp);

return error;
}
int Converter::Effects::DropShadow(Image & src, Image *& dest, int size, int depth, int keep_size)
{
HBITMAP src_bmp=NULL, dest_bmp=NULL;
int error;

src_bmp=getHBitmap(src);
error=_DropShadow(src_bmp, dest_bmp,size,depth,keep_size);
if(!error) dest=getImage(dest_bmp);
FreeHBitmap(src_bmp);
FreeHBitmap(dest_bmp);

return error;
}
int Converter::Effects::DropShadowF(String * src, String * dest, int size, int depth, int keep_size)
{
int error;
GFL_BITMAP *src_bmp=NULL,*dest_bmp=NULL;
GFL_LOAD_PARAMS load_params;
GFL_FILE_INFORMATION informations;
GFL_SAVE_PARAMS gfl_save_params;

gflGetDefaultLoadParams(&load_params);
error=gflLoadBitmap(toChars(src),&src_bmp,&load_params,&informations);
if(error) return error;
ChangeToRGB(src_bmp,&src_bmp);
error=gflDropShadow(src_bmp,&dest_bmp,size,depth,keep_size);
if(error) return error;
PrepareToSave(src,dest_bmp,gfl_save_params,informations);
error=gflSaveBitmap(toChars(dest),dest_bmp,&gfl_save_params);
FreeGFLBitmap(src_bmp);
FreeGFLBitmap(dest_bmp);
gflFreeFileInformation(&informations);

return error;
}

Re: GFL_SDK ver 2.67 Drop shadow problem

Posted: Fri Mar 02, 2007 1:33 pm
by xnview
Do you have tried on simple code like Load/DropShadow/Save??