Out of memory on iOS
Posted: 2014-06-12T18:21:26-07:00
Hi.
When I generate a huge animated GIF on iOS I get an out of memory error while adding the frames:
Is there any way to get around this error?
Cheers
When I generate a huge animated GIF on iOS I get an out of memory error while adding the frames:
Code: Select all
MagickWand* mw = NewMagickWand ();
MagickSetFormat (mw, "gif");
NSString* item;
for (item in contents) {
MagickWand* localWand = NewMagickWand ();
NSData* dataObj = UIImagePNGRepresentation ([UIImage imageWithContentsOfFile:[screenshotsPath stringByAppendingPathComponent:item]]);
MagickReadImageBlob (localWand, [dataObj bytes], [dataObj length]);
MagickSetImageDelay (localWand, 10);
MagickAddImage (mw, localWand);
DestroyMagickWand (localWand);
}
Cheers