6
Sto utilizzando la porta iPhone di ImageMagick. Sto cercando di scorrere i fotogrammi di una gif animata e trasformare ogni fotogramma in un UIImage. So che posso avviare un UIImage con NSData che posso avviare con un const *. Quindi, come ottenere il buffer e la lunghezza dell'immagine?Come ottenere il buffer c da ImageMagick Image
Ecco il codice:
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);
}