I think I need some help.
I'm working on shared library that use Magic++ static libraries (idk if it's important). I use ImageMagick-6.9.2-7, installed on windows by wizard, not builded from sources. I'm working in Visual Studio Enterprise 2015.
Ok so here's simple code that cause that problem
Code: Select all
int changeBrightness( void *imegeData, const size_t size, double changeValue )
{
try
{
static std::once_flag once;
std::call_once( once, Magick::InitializeMagick, "" );
Magick::Blob blob;
blob.updateNoCopy( imegeData, size );
Magick::Image img( blob );
img.modulate( changeValue, 100.0, 100.0 );
}
catch( std::exception &e )
{
std::cout << e.what();
}
return 1;
}
int main()
{
std::vector<uint8_t> data = readFile( "some\\path\\img.png");
changeBrightness( &data[0], data.size(), 10.0 );
return 0;
}
If I write
Code: Select all
blob.update( imegeData, size );
Code: Select all
blob.updateNoCopy( imegeData, size );
There's possibility that I've misunderstand how blobs works. Please give me some information if that's the problem (:
I'm using vector because user of my library'll provide pointer to raw data form file and I need to work with that.