In certain situations, it is necessary and/or convenient to grab a screenshot of the full display from the framebuffer directly, for example for debugging purposes or documentation. By using the well-known [https://imagemagick.org/ ImageMagick toolsuite], this job can be accomplished straightforwardly. This Application Note (AN) shows how to use it on a system running a XELK-based Yocto Linux distribution.
==Installing <code>ImageMagick convert</code>==
Assuming that root file system provides the [[XELK-AN-003:_Package_Management_with_Yocto|<code>smart</code> tool]] and it is set up properly, the <code>ImageMagick</code> package can be installed as follows:
<pre class="board-terminal">
</pre>
Then convert the raw data to a PNG image file, run by running the following command:
The numbers following <code>geometry</code> indicate the resolution (1024x600) and the bits required to represent a pixel (32). The last line tells the pixel format (RGBA). In this case, 8 bits are used for each channel (reg, green, blue, and alpha) resulting in 32 bits combined. That is why the <code>depth</code> parameter of <code>convert</code> was set to 8and the format was set to <code>rgba</code>.