1. Introduction
In this article, we showcase how to install a screenshot tool integrated with compression library on Ubuntu.
2. Installing Shutter
and pngquant
Shutter
is a tool for taking screenshots for Linux-based operating systems. It allows you to capture a snapshot of a specific region, window, entire screen, or even a website, edit it with various effects, highlight important parts with a marker, and publish it to an image hosting service. The Shutter is open-source, free, and GPL v3-licensed.
2.1. Installing Shutter on Ubuntu 22.04 and higher
1) Make sure that we have the universe repository enabled:
2) For your system to be aware of the availability of software from the Universe repository, update the apt cache.
3) Install Shutter
2.2. Installing Shutter on Ubuntu 20.04 & 18.04
1) Refresh repository list:
2) Install the Shutter
tool
2.3. Installing pngquant
pngquant
is a command-line tool and library for PNG image lossy compression. Installing this library is pretty straightforward:
1) Update the apt cache:
2) Install pngquant
2.4. Creating a compressing plugin for Shutter.
1) Make sure Shutter
is not running:
2) Create a folder for the plugin and give it the correct permissions optipngplugin
:
3) Create the script optipngplugin
:
4) Put this content in the script:
You can experiment with --quality min-max
parameter - (min and max are numbers in range 0 worst to 100 perfect).
This parameter instructs pngquant
to use the least amount of colors required to meet or exceed the max quality. Check pngquant website for more information.
5) Save the changes and give correct permissions:
6) Create optipngplugin.png
thumbnail image:
The image should be placed in the following folder:
7) Test the plugin. Open shutter and take a screenshot of your desktop:
8) Right-click in the screenshot and click on "Run a Plugin...", then choose "OptiPNG Plugin" from the list:
9) Run the plugin to recompress the screenshot you took.
That is all, your screenshot should be compressed.
3. Conclusion
In this article, we presented how to install and configure the screenshot tool with compressing plugin on Ubuntu.
{{ 'Comments (%count%)' | trans {count:count} }}
{{ 'Comments are closed.' | trans }}