|
Boost Users : |
Subject: Re: [Boost-users] [boost-users][GIL] Colors broken after moving to New IO
From: Christian Henning (chhenning_at_[hidden])
Date: 2011-04-27 15:24:54
Hi Szymon, I could recreate your problem with Visual Studio 2010 in
32bit. The problem does not occur with 64bit. I'll have a look later
what the problem is.
Thanks for reporting,
Christian
On Wed, Apr 27, 2011 at 10:37 AM, Szymon Gatner <szymon.gatner_at_[hidden]> wrote:
> Hey Christian,
>
> 2011/4/27 Christian Henning <chhenning_at_[hidden]>:
>> Hi Szymon,
>>
>>>
>>> #include <fstream>
>>> #include <boost/foreach.hpp>
>>> #include <boost/gil/extension/io_new/png_read.hpp>
>>>
>>> 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?
>>
>
> Visual C++ 2008 SP1, Win7 x64 building app as 32 bit.
>
> Using libpng 1.2.44 as I was not able to build with 1.5 branch.
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net