Passing filename as argument to program for MagickWriteImage
Posted: 2012-10-24T15:04:11-07:00
Hello, I'm trying to pass the filename of an image as argument to my program and use it with MagickReadImage and then to re-write the image with MagickWriteImage.
When I print the argument the path is fine
gives
There's no error. Bu when I do
I get this
When I print the argument the path is fine
Code: Select all
printf("argv 5 %s\n",argv[5]);
Which is the correct path. When I doargv 5 ../Imagenes/Clase 1/barleyrice001-inca-100dpi-00.png
Code: Select all
status=MagickReadImage(image_wand,argv[5]);
Code: Select all
status=MagickWriteImage(MagickGetImage(image_wand),argv[5]);
Any idea what could be happening? I used the same code but passing the name of the image not from program arguments and it gave me no problem.wand/magick-image.c:12753: MagickWriteImage: Assertion `wand != (MagickWand *) ((void *)0)' failed.