Page 1 of 1

Bugs in gflC C++ Wrapper (gflCBitmap.cpp)

Posted: Wed Feb 15, 2006 8:45 pm
by MaierMan
Code looks like this:

Code: Select all

GFL_ERROR	GFLC_BITMAP::create(const GFLC_BITMAP & bitmap)
{
	return create(bitmap.getType(), bitmap.getBitsPerComponent(), bitmap.getWidth(), bitmap.getHeight()); 
}
While it must be:

Code: Select all

GFL_ERROR	GFLC_BITMAP::create(const GFLC_BITMAP & bitmap)
{
	return create(bitmap.getType(), bitmap.getWidth(), bitmap.getHeight(), bitmap.getBitsPerComponent()); 
}
as of:

Code: Select all

GFL_ERROR					create(GFL_BITMAP_TYPE type, GFL_INT32 width, GFL_INT32 height, GFL_UINT16 bits_per_component=8, GFL_INT32 padding=1, const GFL_COLOR *color=NULL); 
Because of this bug neither the copy c'tor, operator= nor create(bmp) works correctly ;)

Furthermore there are several instances of GetGFLColor (which must be getGFLColor).

Re: Bugs in gflC C++ Wrapper (gflCBitmap.cpp)

Posted: Fri Feb 17, 2006 10:55 am
by xnview
MaierMan wrote:Code looks like this:

Code: Select all

GFL_ERROR	GFLC_BITMAP::create(const GFLC_BITMAP & bitmap)
{
	return create(bitmap.getType(), bitmap.getBitsPerComponent(), bitmap.getWidth(), bitmap.getHeight()); 
}
While it must be:

Code: Select all

GFL_ERROR	GFLC_BITMAP::create(const GFLC_BITMAP & bitmap)
{
	return create(bitmap.getType(), bitmap.getWidth(), bitmap.getHeight(), bitmap.getBitsPerComponent()); 
}
as of:

Code: Select all

GFL_ERROR					create(GFL_BITMAP_TYPE type, GFL_INT32 width, GFL_INT32 height, GFL_UINT16 bits_per_component=8, GFL_INT32 padding=1, const GFL_COLOR *color=NULL); 
Because of this bug neither the copy c'tor, operator= nor create(bmp) works correctly ;)

Furthermore there are several instances of GetGFLColor (which must be getGFLColor).
Ok, thanks...