# Working with metadata in GIF images ## 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. 1. [Load]({{< ref "metadata/java/developer-guide/advanced-usage/loading-files/_index.md" >}}) a GIF image 2. Extract the root metadata package 3. Use the [getGifImageType](https://reference.groupdocs.com/metadata/java/com.groupdocs.metadata.core/GifRootPackage#getGifImageType()) method to obtain file format information **advanced\_usage.managing\_metadata\_for\_specific\_formats.image.gif.GifReadFileFormatProperties** ```csharp 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 for Java also allows managing XMP metadata in GIF files. For more details please refer to the following guide: [Working with XMP Metadata]({{< ref "metadata/java/developer-guide/advanced-usage/working-with-metadata-standards/working-with-xmp-metadata.md" >}}). ## More resources ### GitHub examples You may easily run the code above and see the feature in action in our GitHub examples: * [GroupDocs.Metadata for .NET examples](https://github.com/groupdocs-metadata/GroupDocs.Metadata-for-.NET) * [GroupDocs.Metadata for Java examples](https://github.com/groupdocs-metadata/GroupDocs.Metadata-for-Java) ### GIF metadata management demo App The [GIF Metadata Editing](https://products.groupdocs.app/metadata/gif) app is available to view and edit metadata of GIF images, including XMP properties and image details.