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 of PDF, DOC, DOCX, PPT, PPTX, XLS, XLSX, emails, images...Please tell us how we can improve this page. Skip Send Thank...