{"id":1472,"date":"2021-12-16T12:08:36","date_gmt":"2021-12-16T09:08:36","guid":{"rendered":"https:\/\/files2.tojikon.net\/files-cloud\/2021\/06\/25\/how-to-extract-frames-from-gifs-on-linux\/https:\/\/files2.tojikon.net\/files-cloud\/2021\/06\/25\/how-to-extract-frames-from-gifs-on-linux\/"},"modified":"2021-12-16T12:08:36","modified_gmt":"2021-12-16T09:08:36","slug":"how-to-extract-frames-from-gifs-on-linux","status":"publish","type":"post","link":"https:\/\/tojikon.net\/en\/1472-how-to-extract-frames-from-gifs-on-linux\/","title":{"rendered":"How to extract frames from GIFs on Linux"},"content":{"rendered":"<section id=\"related_posts\">\n<div class=\"block-head\">\n<h3>Related Articles<\/h3>\n<\/div>\n<\/section>\n<p>Got an animated GIF image you wish to extract frames out of on your Linux desktop? Can\u2019t figure out how to do it? We can help! Follow along with this guide as we go over two easy ways to extract frames from GIFs on Linux!<\/p>\n<h2>Method 1 \u2013 GraphicsMagick<\/h2>\n<p>The best way to extract individual frames from a GIF image on Linux is with the GraphicsMagick tool. It has a robust command line, and you can use it to decompile an entire GIF to individual PNG frame files.<\/p>\n<p>Sadly, the GraphicsMagick tool doesn\u2019t come pre-installed on very many Linux operating systems. As a result, you\u2019ll need to get the app installed on your computer before attempting to use it.\u00a0<\/p>\n<p>To start the installation of GraphicsMagick on your Linux PC, open up a terminal window. Open up a terminal window on the Linux desktop and press <strong>Ctrl + Alt + T\u00a0<\/strong>on the keyboard. Or, alternatively, search for \u201cTerminal\u201d in the app menu and open it that way.<\/p>\n<p>Once your terminal window is open, follow along with the installation instructions outlined below that corresponds to the Linux operating system you use on your PC.<\/p>\n<h4>Ubuntu<\/h4>\n<p>On Ubuntu, you can get the GraphicsMagick application up and running by making use of the following\u00a0<strong>apt install\u00a0<\/strong>command below in a terminal window.<\/p>\n<pre>\nsudo apt install graphicsmagick\n<\/pre>\n<h4>Debian<\/h4>\n<p>If you\u2019re on Debian Linux, you\u2019ll be able to get the GraphicsMagick tool working on your system with a single\u00a0<strong>apt-get install\u00a0<\/strong>command in the terminal window.<\/p>\n<pre>\nsudo apt-get install graphicsmagick\n<\/pre>\n<h4>Arch Linux<\/h4>\n<p>If you\u2019re an Arch Linux user, you\u2019ll be able to install the GraphicsMagick application on your system through the \u201cExtra\u201d software repository using the\u00a0<strong>pacman\u00a0<\/strong>command below.<\/p>\n<pre>\nsudo pacman -S graphicsmagick\n<\/pre>\n<h4>Fedora<\/h4>\n<p>Those using Fedora Linux will be able to get the GraphicsMagick application up and running by making use of the following\u00a0<strong>dnf install\u00a0<\/strong>command below in a terminal window.<\/p>\n<pre>\nsudo dnf install graphicsmagick\n<\/pre>\n<h4>OpenSUSE<\/h4>\n<p>OpenSUSE Linux has the latest GraphicsMagick tool in their software repositories. To get it working on your system, use the following <strong>zypper install\u00a0<\/strong>command below in a terminal window.<\/p>\n<h4>Generic Linux<\/h4>\n<p>If you\u2019re using a Linux operating system not covered in this guide, you can install GraphicsMagick on your computer by searching for \u201cgraphicsmagick\u201d and installing it using your package manager. Alternatively, you can go to the official website and follow the installation guide.<\/p>\n<h3>Extracting frames with GraphicsMagick<\/h3>\n<p>To extract frames from a GIF using GraphicsMagick, use the\u00a0<strong>gm convert\u00a0<\/strong>command. However, first, you must use the <strong>CD\u00a0<\/strong>command to move to the directory you have your GIF image in. In this example, the GIF is in \u201cPictures.<\/p>\n<pre>\ncd ~\/Pictures\n<\/pre>\n<p>Once in the directory, begin the decompilation. It shouldn\u2019t take long.<\/p>\n<pre>\ngm convert MY-GIF.gif -coalesce +adjoin GIF_Frame%3d.png\n<\/pre>\n<p>When the conversion is complete, you\u2019ll see many PNG images with the filename \u201cGIF_FRAME\u201d followed by a number. Look through these image files for the frame you wish to keep and delete the rest.<\/p>\n<h2>Method 2 \u2013 Gimp<\/h2>\n<p>If the command-line isn\u2019t for you, another way to extract frames from a GIF image is by importing the GIF into Gimp, exploring the animation as individual frames, and saving the frame you want.<\/p>\n<p>To get started with extracting frames out of GIF image files using Gimp, you\u2019ll need to install the program. To install Gimp, please follow our installation guide.<\/p>\n<h3>Extracting frames with Gimp<\/h3>\n<p>Extracting individual frames from a GIF file in Gimp is pretty straightforward. To start, open up the Linux file manager and right-click on your GIF with the mouse. Then, look through the right-click menu for \u201cOpen with\u201d and hover over it.<\/p>\n<p>After hovering over \u201cOpen with,\u201d select the option \u201cOpen with GNU Image Manipulation Program\u201d and click on it. Doing this will load your GIF into GIMP.<\/p>\n<p>Once the GIF is loaded into GIMP, look at your layers. Each frame in the GIF is its own layer. From here, click on the eye icon to hide every single frame so that nothing is showing on the canvas.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-404879 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-extract-frames-from-gifs-on-linux.png\" alt=\"\" width=\"1200\" height=\"666\" srcset=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-extract-frames-from-gifs-on-linux.png 1200w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-extract-frames-from-gifs-on-linux-3.png 300w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-extract-frames-from-gifs-on-linux-4.png 1024w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-extract-frames-from-gifs-on-linux-5.png 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\"\/><\/p>\n<p>When all images are hidden (by clicking on the eye icon), go through the layers and locate the individual frame you wish to extract. Then, click on the eye icon for the frame you want to show on the canvas to be the only layer visible.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-404880 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-extract-frames-from-gifs-on-linux-1.png\" alt=\"\" width=\"1200\" height=\"550\" srcset=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-extract-frames-from-gifs-on-linux-1.png 1200w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-extract-frames-from-gifs-on-linux-6.png 300w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-extract-frames-from-gifs-on-linux-7.png 1024w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-extract-frames-from-gifs-on-linux-8.png 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\"\/><\/p>\n<p>Now that your chosen frame is the only one visible on the canvas click on the \u201cFile\u201d menu to reveal its options. Then, click on the \u201cExport As\u201d button to begin the exporting process.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-404878 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-extract-frames-from-gifs-on-linux-2.png\" alt=\"\" width=\"1201\" height=\"612\" srcset=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-extract-frames-from-gifs-on-linux-2.png 1201w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-extract-frames-from-gifs-on-linux-9.png 300w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-extract-frames-from-gifs-on-linux-10.png 1024w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-extract-frames-from-gifs-on-linux-11.png 768w\" sizes=\"(max-width: 1201px) 100vw, 1201px\"\/><\/p>\n<p>In the \u201cExport\u201d menu, save your frame as a PNG file or JPG file. Be sure to choose a familiar location on your Linux file system to save it. Otherwise, you may forget when you put the image file.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Related Articles Got an animated GIF image you wish to extract frames out of on your Linux desktop? Can\u2019t figure out how to do it? We can help! Follow along with this guide as we go over two easy ways to extract frames from GIFs on Linux! Method 1 \u2013 GraphicsMagick The best way to &hellip;<\/p>\n","protected":false},"author":1,"featured_media":1473,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[21],"tags":[33],"_links":{"self":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/posts\/1472"}],"collection":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/comments?post=1472"}],"version-history":[{"count":0,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/posts\/1472\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/media\/1473"}],"wp:attachment":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/media?parent=1472"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/categories?post=1472"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/tags?post=1472"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}