Gentoo Archives: gentoo-user

From: tastytea <gentoo@××××××××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] How do I compress jpeg files?
Date: Fri, 18 Sep 2020 13:59:20
Message-Id: 20200918155859.74796aba@ventiloplattform.tastytea.de
In Reply to: [gentoo-user] How do I compress jpeg files? by Alan Mackenzie
1 On 2020-09-18 13:32+0000 Alan Mackenzie <acm@×××.de> wrote:
2
3 > Hello, Gentoo!
4 >
5 > I've a number of jpeg files, 17 to be precise, which are high
6 > resolution and are around 3½ megabytes each. I would like to
7 > compress them down to around 100 kb each.
8 >
9 > I'm sure this is possible, if tedious, in gimp, somehow, but I can't
10 > for the life of me work out how (since it's years since I last did
11 > this).
12 >
13 > What is the best way (minimal learning, scriptable if possible), to do
14 > this?
15
16 I'm not aware of a way that allows you to specify a file size, but you
17 can use convert from media-gfx/imagemagick to re-compress and/or resize
18 the files. For example:
19
20 convert -quality 50 in.jpg out.jpg
21 convert -resize 1000 in.jpg out.jpg
22
23 The last command makes the image 1000px wide and sets the height
24 automatically to the right value.
25
26 Hope this helps,
27 tastytea
28
29 --
30 Get my PGP key with `gpg --locate-keys tastytea@××××××××.de` or at
31 <https://tastytea.de/tastytea.asc>.

Replies

Subject Author
Re: [gentoo-user] How do I compress jpeg files? Michael <confabulate@××××××××.com>
Re: [gentoo-user] How do I compress jpeg files? Alan Mackenzie <acm@×××.de>