Example usage for com.itextpdf.text.pdf.codec GifImage getFrameCount

List of usage examples for com.itextpdf.text.pdf.codec GifImage getFrameCount

Introduction

In this page you can find the example usage for com.itextpdf.text.pdf.codec GifImage getFrameCount.

Prototype

public int getFrameCount() 

Source Link

Document

Gets the number of frames the gif has.

Usage

From source file:com.pdf.GetPdf.java

public static void addGif(Document document, String path) throws IOException, DocumentException {
    GifImage img = new GifImage(path);
    int n = img.getFrameCount();
    for (int i = 1; i <= n; i++) {
        document.add(img.getImage(i));/* w  w  w  .ja v a 2s .c o m*/
    }
}