MAGICKCORE_QUANTUM_DEPTH=8 chops filenames??
Posted: 2014-11-13T12:54:45-07:00
I have a strange experience here with Magick++. if i define "-DMAGICKCORE_QUANTUM_DEPTH=8", somehow, it seems to chop off the first 8 characters of the file name it is given. (e.g. readImages(&img, "background.png"); -> terminate called after throwing an instance of: 'Magick::ErrorBlob'; what(): test: unable to open image `nd.png': No such file or directory @ error/blob.c/OpenBlob/2646
Short code sample that exhibits this behaviour:
Compile: gcc -lstdc++ -std=c++11 test.cpp -DMAGICKCORE_HDRI_ENABLE=false -DMAGICKCORE_QUANTUM_DEPTH=8 -I/usr/include/ImageMagick-6 -lMagick++-6.Q16 -lMagickCore-6.Q16 -o test
To test: make a 'background.png' image available (or not; it will show regardless of its prescense)
./test background.png
observe the following errror:
terminate called after throwing an instance of 'Magick::ErrorBlob'
what(): Magick: unable to open image `nd.png': No such file or directory @ error/blob.c/OpenBlob/2646
Aborted (core dumped)
Now recompile with -DMAGICKCORE_QUANTUM_DEPTH=16
make sure background.png (or whatever filename you give it) is available.
run ./test background.png
No error!
Does anyone else see this behaviour?
Short code sample that exhibits this behaviour:
Code: Select all
#include <list>
#include <Magick++.h>
int main(int argc, char* argv[]){
std::list<Magick::Image> img;
readImages(&img, argv[1]);
}
Compile: gcc -lstdc++ -std=c++11 test.cpp -DMAGICKCORE_HDRI_ENABLE=false -DMAGICKCORE_QUANTUM_DEPTH=8 -I/usr/include/ImageMagick-6 -lMagick++-6.Q16 -lMagickCore-6.Q16 -o test
To test: make a 'background.png' image available (or not; it will show regardless of its prescense)
./test background.png
observe the following errror:
terminate called after throwing an instance of 'Magick::ErrorBlob'
what(): Magick: unable to open image `nd.png': No such file or directory @ error/blob.c/OpenBlob/2646
Aborted (core dumped)
Now recompile with -DMAGICKCORE_QUANTUM_DEPTH=16
make sure background.png (or whatever filename you give it) is available.
run ./test background.png
No error!
Does anyone else see this behaviour?