iOS ConvertImageCommand UnableToOpenBlob
Posted: 2012-02-21T12:12:55-07:00
Hi,
I'm trying to use ConvertImageCommand and port over a script like:
But I am getting a lot of errors, which I originally thought was the imagemagick installation, but based on 5 days of looking all over the web and this server for answers, it seems like it may be the way I'm trying to break up the script into strings.
Can anyone help me with reference to how to split up strings for the ConvertImageCommand?
Code and Errors below,
Amy
The code:
The errors:
: UnableToOpenConfigureFile `colors.xml' @ warning/configure.c/GetConfigureOptions/591.
: UnableToOpenBlob `\(': No such file or directory @ error/blob.c/OpenBlob/2614.
: UnableToOpenConfigureFile `delegates.xml' @ warning/configure.c/GetConfigureOptions/591.
: NoDecodeDelegateForThisImageFormat `\(' @ error/constitute.c/ReadImage/532.
: InvalidArgument `sparse-color': Invalid number of Arguments @ error/mogrify.c/SparseColorOption/517.
: UnableToOpenBlob `\)': No such file or directory @ error/blob.c/OpenBlob/2614.
: NoDecodeDelegateForThisImageFormat `\)' @ error/constitute.c/ReadImage/532.
: UnableToOpenBlob `\(': No such file or directory @ error/blob.c/OpenBlob/2614.
: NoDecodeDelegateForThisImageFormat `\(' @ error/constitute.c/ReadImage/532.
: UnableToOpenBlob `\) ': No such file or directory @ error/blob.c/OpenBlob/2614.
: NoDecodeDelegateForThisImageFormat `\) ' @ error/constitute.c/ReadImage/532.
: UnableToOpenBlob `\(': No such file or directory @ error/blob.c/OpenBlob/2614.
: NoDecodeDelegateForThisImageFormat `\(' @ error/constitute.c/ReadImage/532.
: UnableToOpenBlob `\)': No such file or directory @ error/blob.c/OpenBlob/2614.
: NoDecodeDelegateForThisImageFormat `\)' @ error/constitute.c/ReadImage/532.
: ImproperImageHeader `/Users/gooch/Library/Application Support/iPhone Simulator/5.0/Applications/B7232AA7-7B2E-4CA7-9ACF-B6C403026113/tmp/magick-Weowj5zy' @ error/miff.c/ReadMIFFImage/507.
: NoDecodeDelegateForThisImageFormat `/Users/gooch/Library/Application Support/iPhone Simulator/5.0/Applications/B7232AA7-7B2E-4CA7-9ACF-B6C403026113/tmp/magick-d0sWhqAQ' @ error/constitute.c/ReadImage/532.
: UnableToOpenBlob `composite': No such file or directory @ error/blob.c/OpenBlob/2614.
: NoDecodeDelegateForThisImageFormat `composite' @ error/constitute.c/ReadImage/532.
: NoDecodeDelegateForThisImageFormat `/Users/gooch/Library/Application Support/iPhone Simulator/5.0/Applications/B7232AA7-7B2E-4CA7-9ACF-B6C403026113/tmp/magick-o8grgMnb' @ error/constitute.c/ReadImage/532.
: UnrecognizedOption `-displace' @ error/convert.c/ConvertImageCommand/1312.
I'm trying to use ConvertImageCommand and port over a script like:
Code: Select all
convert rose: -background black -gravity south -splice 0x8 \
\( +clone -sparse-color barycentric '0,0 black 69,0 white' \) \
\( +clone -function arcsin 0.5 \) \
\( -clone 1 -level 25%,75% \
-function polynomial -4,4,0 -gamma 2 \
+level 50%,0 \) \
-delete 1 -swap 0,1 miff:- |\
composite - -virtual-pixel black -displace 17x7 rose_cylinder.png
Can anyone help me with reference to how to split up strings for the ConvertImageCommand?
Code and Errors below,
Amy
The code:
Code: Select all
LOG(@"In clyindericalWarp\n");
char *args[] = {"convert", "rose:", "-background", "black", "-gravity", "south", "-splice", "0x8",
"\\(", "+clone", "-sparse-color", "barycentric", "'0,0 black 69,0 white", "\\)" ,
"\\(", "+clone", "-function", "arcsin", "0.5", "\\) ",
"\\(", "-clone", "1", "-level", "25%,75%",
"-function", "polynomial", "-4,4,0", "-gamma", "2",
"+level", "50%,0","\\)",
"-delete", "1", "-swap", "0,1", "miff:-",
"|" , "composite", "-" ,"-virtual-pixel", "black", "-displace" ,"17x7" , "rose_cylinder.png",NULL};
MagickCoreGenesis("",MagickFalse);
int args_count;
for(args_count = 0; args[args_count] != (char *)NULL; args_count++);
ImageInfo *image_info = AcquireImageInfo();
ExceptionInfo *exception = AcquireExceptionInfo();
MagickBooleanType status =
ConvertImageCommand(image_info, args_count, args, NULL, exception);
if (exception->severity != UndefinedException)
{
status=MagickTrue;
CatchException(exception);
}
// This should not be needed as error is reported as an exception
if (status == MagickFalse)
fprintf(stderr, "Error in call\n");
image_info=DestroyImageInfo(image_info);
exception=DestroyExceptionInfo(exception);
MagickCoreTerminus();
: UnableToOpenConfigureFile `colors.xml' @ warning/configure.c/GetConfigureOptions/591.
: UnableToOpenBlob `\(': No such file or directory @ error/blob.c/OpenBlob/2614.
: UnableToOpenConfigureFile `delegates.xml' @ warning/configure.c/GetConfigureOptions/591.
: NoDecodeDelegateForThisImageFormat `\(' @ error/constitute.c/ReadImage/532.
: InvalidArgument `sparse-color': Invalid number of Arguments @ error/mogrify.c/SparseColorOption/517.
: UnableToOpenBlob `\)': No such file or directory @ error/blob.c/OpenBlob/2614.
: NoDecodeDelegateForThisImageFormat `\)' @ error/constitute.c/ReadImage/532.
: UnableToOpenBlob `\(': No such file or directory @ error/blob.c/OpenBlob/2614.
: NoDecodeDelegateForThisImageFormat `\(' @ error/constitute.c/ReadImage/532.
: UnableToOpenBlob `\) ': No such file or directory @ error/blob.c/OpenBlob/2614.
: NoDecodeDelegateForThisImageFormat `\) ' @ error/constitute.c/ReadImage/532.
: UnableToOpenBlob `\(': No such file or directory @ error/blob.c/OpenBlob/2614.
: NoDecodeDelegateForThisImageFormat `\(' @ error/constitute.c/ReadImage/532.
: UnableToOpenBlob `\)': No such file or directory @ error/blob.c/OpenBlob/2614.
: NoDecodeDelegateForThisImageFormat `\)' @ error/constitute.c/ReadImage/532.
: ImproperImageHeader `/Users/gooch/Library/Application Support/iPhone Simulator/5.0/Applications/B7232AA7-7B2E-4CA7-9ACF-B6C403026113/tmp/magick-Weowj5zy' @ error/miff.c/ReadMIFFImage/507.
: NoDecodeDelegateForThisImageFormat `/Users/gooch/Library/Application Support/iPhone Simulator/5.0/Applications/B7232AA7-7B2E-4CA7-9ACF-B6C403026113/tmp/magick-d0sWhqAQ' @ error/constitute.c/ReadImage/532.
: UnableToOpenBlob `composite': No such file or directory @ error/blob.c/OpenBlob/2614.
: NoDecodeDelegateForThisImageFormat `composite' @ error/constitute.c/ReadImage/532.
: NoDecodeDelegateForThisImageFormat `/Users/gooch/Library/Application Support/iPhone Simulator/5.0/Applications/B7232AA7-7B2E-4CA7-9ACF-B6C403026113/tmp/magick-o8grgMnb' @ error/constitute.c/ReadImage/532.
: UnrecognizedOption `-displace' @ error/convert.c/ConvertImageCommand/1312.