/// <summary>Reads image source and fills GifImage object with parameters (frames, width, height)</summary> /// <param name="image">GifImage</param> /// <param name="lastFrameNumber">the last frame of the gif image should be read</param> public static void ProcessImage(GifImageData image, int lastFrameNumber) { GifImageHelper.GifParameters gif = new GifImageHelper.GifParameters(image); Stream gifStream; try { if (image.GetData() == null) { image.LoadData(); } gifStream = new MemoryStream(image.GetData()); Process(gifStream, gif, lastFrameNumber); } catch (System.IO.IOException e) { throw new iText.IO.IOException(iText.IO.IOException.GifImageException, e); } }