Detecting the GIF version The following sample of code will help you to detect the version of a loaded GIF image and extract some additional file format information.
Load a GIF image Extract the root metadata package Use the getGifImageType method to obtain file format information advanced_usage.managing_metadata_for_specific_formats.image.gif.GifReadFileFormatProperties
try (Metadata metadata = new Metadata(Constants.InputGif)) { GifRootPackage root = metadata.getRootPackageGeneric(); System.out.println(root.getGifImageType().getFileFormat()); System.out.println(root.getGifImageType().getVersion()); System.out.println(root.getGifImageType().getByteOrder()); System.out.println(root.getGifImageType().getMimeType()); System.out.println(root.getGifImageType().getExtension()); System.out.println(root.getGifImageType().getWidth()); System.out.println(root.getGifImageType().getHeight()); } Working with XMP Metadata GroupDocs.... DOC, DOCX, PPT, PPTX, XLS, XLSX, emails, images and more with...