[DEBUG] try to corret reading of files
This commit is contained in:
parent
2d8af2d99c
commit
e628bba94f
@ -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<float,4>>& _data, const ivec2& _size);
|
||||||
void set(const std::vector<etk::Color<uint8_t,4>>& _data, const ivec2& _size);
|
void set(const std::vector<etk::Color<uint8_t,4>>& _data, const ivec2& _size);
|
||||||
void swap(egami::Image& _image);
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,8 +171,8 @@ namespace egami {
|
|||||||
|
|
||||||
const T& get__(const ivec2& _pos) const {
|
const T& get__(const ivec2& _pos) const {
|
||||||
static const T errorColor(0x00000000);
|
static const T errorColor(0x00000000);
|
||||||
if( _pos.x()>0 && _pos.x()<m_size.x()
|
if( _pos.x()>=0 && _pos.x()<m_size.x()
|
||||||
&& _pos.y()>0 && _pos.y()<m_size.y()) {
|
&& _pos.y()>=0 && _pos.y()<m_size.y()) {
|
||||||
return m_data[_pos.x()+_pos.y()*m_size.x()];
|
return m_data[_pos.x()+_pos.y()*m_size.x()];
|
||||||
}
|
}
|
||||||
return errorColor;
|
return errorColor;
|
||||||
|
@ -226,9 +226,10 @@ egami::Image egami::loadBMP(const std::string& _inputFile) {
|
|||||||
tmpColor.setA(0xFF);
|
tmpColor.setA(0xFF);
|
||||||
out.set(ivec2(xxx,yyy), tmpColor);
|
out.set(ivec2(xxx,yyy), tmpColor);
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
for(int32_t xxx=0; xxx<offset; xxx++) {
|
for(int32_t xxx=0; xxx<offset; xxx++) {
|
||||||
pointer++;
|
pointer++;
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user