#186 C++ wrapper: ilImage::Convert() lacks a parameter

open
nobody
None
5
2009-09-01
2009-09-01
clément courbet
No

The ilImage::Convert() function of the c++ wrapper needs an other parameter to enable full functionality. For the moment, only the format can be converted, not the type. I suggest changing:

ILboolean ilImage::Convert(ILenum NewFormat)
{
if (this->Id) {
this->Bind();
return ilConvertImage(NewFormat, IL_UNSIGNED_BYTE);
}
return IL_FALSE;
}

to :

ILboolean ilImage::Convert(ILenum NewFormat, ILenum NewType = IL_UNSIGNED_BYTE)
{
if (this->Id) {
this->Bind();
return ilConvertImage(NewFormat, NewType);
}
return IL_FALSE;
}

which would provide the desired functionality while integrating seamlessly into existing applications.

Discussion