Hi Szymon,
#include <fstream> #include
#include using namespace boost;
int main() { gil::rgba8_image_t img;
gil::read_image("test.png", img, gil::png_tag());
std::ofstream os("dump.txt");
int size = sizeof(gil::rgba8_pixel_t);
BOOST_FOREACH(const gil::rgba8_pixel_t& pix, std::make_pair(img._view.begin(), img._view.end())) { os << (int) pix[0] << " " << (int) pix[1] << " " << (int) pix[2] << " " << (int) pix[3] << "\n"; } }
that code produces different text files when built in debug and release modes and observed text file difference is exactly what I also experience on the screen. For example:
I have tried your code and cannot recreate your problem. Both dump.txt files have exactly the same data inside. What compiler do you use and what architecture do you work on? Regards, Christian