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

Discussions on GFL SDK, the graphic library for reading and writing graphic files

Moderators: XnTriq, helmut, xnview

MaierMan
Posts: 78
Joined: Wed Aug 04, 2004 8:32 pm

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

Post 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).
User avatar
xnview
Author of XnView
Posts: 44920
Joined: Mon Oct 13, 2003 7:31 am
Location: France

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

Post 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...
Pierre.