6
Estoy usando el puerto de iPhone de ImageMagick. Intento recorrer los fotogramas de un gif animado y convertir cada fotograma en un UIImage. Sé que puedo iniciar un UIImage con NSData que puedo iniciar con un const void *. Entonces, ¿cómo puedo obtener el buffer y la longitud de la imagen?Cómo obtener c buffer desde ImageMagick Image
Aquí está el código:
MagickReadImage(wand, filename);
while(MagickHasNextImage(wand)) {
Image *myImage = GetImageFromMagickWand(wand);
//HELP ME PLEASE
const void *myBuff =myImage->blob; //guessing this is the right way to get the buffer?
int myLength = ????? //no idea how to get the length
NSData *myData = [[NSData alloc] initWithBytes:myBuff length:myLength];
UIImage myImage = [[UIImage alloc] initWithData:myData]];
MagickNextImage(wand);
}