Objective-C - Convertendo NSString em uma string C [duplicata]
Possible Duplicate:
objc warning: “descartar qualificadores do tipo de alvo do ponteiro”
Estou com problemas para converter umNSString
para uma string C.
const char *input_image = [[[NSBundle mainBundle] pathForResource:@"iphone" ofType:@"png"] UTF8String];
const char *output_image = [[[NSBundle mainBundle] pathForResource:@"iphone_resized" ofType:@"png"] UTF8String];
const char *argv[] = { "convert", input_image, "-resize", "100x100", output_image, NULL };
// ConvertImageCommand(ImageInfo *, int, char **, char **, MagickExceptionInfo *);
// I get a warning: Passing argument 3 'ConvertImageCommand' from incompatible pointer type.
ConvertImageCommand(AcquireImageInfo(), 2, argv, NULL, AcquireExceptionInfo());
Também quando depuroargv
não parece certo. Vejo valores como:
argv[0] contains 99 'c' // Shouldn't this be "convert"?
argv[1] contains 0 '\100' // and shouldn't this be the "input_image" string?