iOS CGContextDrawImage <Error> Empty path clip

231 Views Asked by At

I'm developing app which makes video from images and it's working well. Exporting images into video is working well and also insert watermark is working.

But when app goes background and returned to app and export video the app crashes.

Here's a source code:

CGContextRestoreGState(context);

CGContextDrawImage(context, CGRectMake(208*2 - 5 , 5*2, 89 * 2, 20 * 2), mWaterMarkCGImage);

The error happens in CGContextDrawImage.

Can anyone please help me?

1

There are 1 best solutions below

0
On

Make sure you are saving the context when app goes in background.

CGContextSaveGState(context);