Как получить буфер c ImageMagick Image

Я использую порт iPhone для ImageMagick. Я пытаюсь перебрать кадры анимированного GIF и превратить каждый кадр в UIImage. Я знаю, что могу инициировать UIImage с NSData, который я могу инициировать с помощью const void *. Так как мне получить буфер и длину изображения?

Вот код:

    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);
    }

Ответы на вопрос(1)

Ваш ответ на вопрос