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?
Drop Shadow in ver 2.67
Moderators: XnTriq, helmut, xnview
-
- Author of XnView
- Posts: 44470
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: Drop Shadow in ver 2.67
Could you tell me which parameters do you use?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?
Pierre.
-
- Posts: 8
- Joined: Thu Feb 15, 2007 3:57 pm
GFL_SDK ver 2.67 Drop shadow problem
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;
}
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;
}
-
- Author of XnView
- Posts: 44470
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: GFL_SDK ver 2.67 Drop shadow problem
Do you have tried on simple code like Load/DropShadow/Save??
Pierre.