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....Metadata Product Solution GroupDocs...Product Solution GroupDocs.Parser Product Solution GroupDocs...