Reputation: 53
Here is link for png++ :http://savannah.nongnu.org/projects/pngpp/
What I'm doing wrong? I installed opencv for OS X by command in terminal:"brew install opencv" and I have problems with using library png++.
#include <iostream>
#include "png++/png.hpp"
using namespace std;
int main(int argc, const char * argv[])
{
png::image< png::rgb_pixel > image("74");
for(int i=0;i<image.get_width();i++)
{
for(int j=0;j<image.get_height();j++)
{
image[i][j]=png::rgb_pixel(255-image[i][j].red, 255-image[i][j].green, 255-image[i][j].blue);
}
}
image.write("output.png");
return 0;
}
And I have next errors:
Upvotes: 2
Views: 878
Reputation: 53
Problem was, that I install opencv with brew, which I installed on Yosemite. When I updated brew on ElCapitan and reinstalled opencv, errors disappeared.
Upvotes: 2