[DEBUG] try to corret reading of files

This commit is contained in:
Edouard DUPIN 2016-12-19 23:01:20 +01:00
parent 2d8af2d99c
commit e628bba94f
3 changed files with 4 additions and 4 deletions

View File

@ -140,7 +140,6 @@ namespace egami {
void set(const std::vector<etk::Color<float,4>>& _data, const ivec2& _size);
void set(const std::vector<etk::Color<uint8_t,4>>& _data, const ivec2& _size);
void swap(egami::Image& _image);
};
}

View File

@ -171,8 +171,8 @@ namespace egami {
const T& get__(const ivec2& _pos) const {
static const T errorColor(0x00000000);
if( _pos.x()>0 && _pos.x()<m_size.x()
&& _pos.y()>0 && _pos.y()<m_size.y()) {
if( _pos.x()>=0 && _pos.x()<m_size.x()
&& _pos.y()>=0 && _pos.y()<m_size.y()) {
return m_data[_pos.x()+_pos.y()*m_size.x()];
}
return errorColor;

View File

@ -226,9 +226,10 @@ egami::Image egami::loadBMP(const std::string& _inputFile) {
tmpColor.setA(0xFF);
out.set(ivec2(xxx,yyy), tmpColor);
}
/*
for(int32_t xxx=0; xxx<offset; xxx++) {
pointer++;
}
}*/
}
}
break;