Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
39
votes
8
answers
37254
views
Is there a way to flatten a .pdf image from the command line?
In GIMP, I can import a PDF, and use the GUI to flatten it (if it was made with many layers) by selecting `Flatten Image` in the `Image` dropdown menu. I can then export the PDF with a new filename. I would like to automate this. Is there some way to do it via the terminal?
In GIMP, I can import a PDF, and use the GUI to flatten it (if it was made with many layers) by selecting
Flatten Image
in the Image
dropdown menu. I can then export the PDF with a new filename.
I would like to automate this. Is there some way to do it via the terminal?
generic_user
(637 rep)
Oct 19, 2014, 12:20 AM
• Last activity: Jul 26, 2025, 01:31 PM
2
votes
2
answers
1246
views
How to extract comment from ppm file?
I have ppm file X.ppm with comment : xxd X.ppm|head -10 0000000: 5036 0a23 206d 6967 6874 796d 616e 6465 P6.# mightymande 0000010: 6c20 2d32 2e38 3034 3132 3232 3037 3833 l -2.80412220783 0000020: 3834 3132 3833 3535 3139 3235 652d 3032 841283551925e-02 0000030: 202b 2036 2e39 3438 3932 3238 3438 31...
I have ppm file X.ppm with comment :
xxd X.ppm|head -10
0000000: 5036 0a23 206d 6967 6874 796d 616e 6465 P6.# mightymande
0000010: 6c20 2d32 2e38 3034 3132 3232 3037 3833 l -2.80412220783
0000020: 3834 3132 3833 3535 3139 3235 652d 3032 841283551925e-02
0000030: 202b 2036 2e39 3438 3932 3238 3438 3134 + 6.94892284814
0000040: 3730 3430 3430 3831 3238 3631 652d 3031 704040812861e-01
0000050: 2069 2040 2034 2e34 3430 3839 3230 3938 i @ 4.440892098
0000060: 3530 3036 3237 3165 2d31 360a 3132 3830 5006271e-16.1280
0000070: 2037 3230 0a32 3535 0aff ffff ffff ffff 720.255........
0000080: ffff ffff ffff ffff ffff ffff ffff fefe ................
0000090: fefc fcfc f8f8 f8e8 e8e8 4141 4140 4040 ..........AAA@@@
It is created with c code :
void record_write(FILE *out, unsigned char *buffer, int width, int height, mpfr_t centerx, mpfr_t centery, mpfr_t radius) {
fprintf(out, "P6\n");
mpfr_fprintf(out, "# mightymandel %Re + %Re i @ %Re\n", centerx, centery, radius);
fprintf(out, "%d %d\n255\n", width, height);
fflush(out);
for (int y = height - 1; y >= 0; --y) {
fwrite(buffer + y * width * 3, width * 3, 1, out);
}
fflush(out);
}
I can convert it to png :
xxd X.png|head -10
0000000: 8950 4e47 0d0a 1a0a 0000 000d 4948 4452 .PNG........IHDR
0000010: 0000 0500 0000 02d0 0802 0000 0137 187a .............7.z
0000020: 9700 0000 5f74 4558 7454 6974 6c65 002d ...._tEXtTitle.-
0000030: 322e 3830 3431 3232 3230 3738 3338 3431 2.80412220783841
0000040: 3238 3335 3531 3932 3565 2d30 3220 2b20 283551925e-02 +
0000050: 362e 3934 3839 3232 3834 3831 3437 3034 6.94892284814704
0000060: 3034 3038 3132 3836 3165 2d30 3120 6920 040812861e-01 i
0000070: 4020 342e 3434 3038 3932 3039 3835 3030 @ 4.440892098500
0000080: 3632 3731 652d 3136 aba5 7721 0000 0015 6271e-16..w!....
0000090: 7445 5874 536f 6674 7761 7265 006d 6967 tEXtSoftware.mig
It also contain comment, but :
- It is not exif ( and ppm is not supported by eviv2 library ).
- Gimp also do not show comment from ppm or png file ( why ?)
- identify -verbose X.ppm shows comment
What program should I use to extract comment from ppm files ?
Adam
(1019 rep)
Dec 23, 2014, 04:24 PM
• Last activity: Feb 26, 2025, 11:13 PM
0
votes
2
answers
166
views
Installing Gimp-devel on arch linux: could not find all required packages: gegl >=0.4.52
When I run `yay` to upgrade my system I run into this: ``` :: Synchronizing package databases... core is up to date extra is up to date community is up to date multilib is up to date :: Searching AUR for updates... -> No AUR package found for gegl>=0.4.52 ... :: 1 packages to upgrade/install. 1 aur/...
When I run
yay
to upgrade my system I run into this:
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
multilib is up to date
:: Searching AUR for updates...
-> No AUR package found for gegl>=0.4.52
...
:: 1 packages to upgrade/install.
1 aur/gimp-devel 3.0.0rc1-1 -> 3.0.0rc2-1
==> Packages to exclude: (eg: "1 2 3", "1-3", "^4" or repo name)
-> Excluding packages may cause partial upgrades and break systems
==>
-> could not find all required packages: gegl >=0.4.52
I am on fully updated Arch linux. How can I resolve this issue?
Jan Černý
(1723 rep)
Dec 30, 2024, 09:53 AM
• Last activity: Dec 31, 2024, 05:02 PM
0
votes
1
answers
78
views
From GIMP, how to store images losslessly at maximum compression when creating a PDF?
Assume an image opened in GIMP in Debian 12. From this image, you would like to create a single-page PDF file with maximum lossless compression. How? As of 2024-12-19, https://docs.gimp.org/en/gimp-images-out.html doesn't mention PDF at all. Besides GIMP, you have standard Linux tools at your dispos...
Assume an image opened in GIMP in Debian 12. From this image, you would like to create a single-page PDF file with maximum lossless compression. How? As of 2024-12-19, https://docs.gimp.org/en/gimp-images-out.html doesn't mention PDF at all. Besides GIMP, you have standard Linux tools at your disposal, including ImageMagick.
AlMa1r
(1 rep)
Dec 19, 2024, 03:12 AM
• Last activity: Dec 20, 2024, 01:27 AM
0
votes
0
answers
20
views
Check Geometrical Match of Two Scanned Images with Standard Linux Tools
I have two images (taken with a scanner at the same resolution) and I want to superimpose them on the screen to see how well two features match to each other after applying the right shift and rotation to one of them (like a combination of a front and the back side of a printed circuit board). The t...
I have two images (taken with a scanner at the same resolution) and I want to superimpose them on the screen to see how well two features match to each other after applying the right shift and rotation to one of them (like a combination of a front and the back side of a printed circuit board).
The two images are shifted and rotated with respect to each other with unknown parameters (
dX
, dY
and rotation angle phi
). In my case there are no straight outlines to calculate a matching corner or measure the relative rotation angle between the two scans.
In Gimp there are tools to flip images, to shift an image and to rotate them. One can superimpose one onto the other by using different layers and applying some degree of transparency to the uppermost layer. Using Gimp's **Tools>Move** and **Tools>Rotate** one after the other is very cumbersome.
There also is an uniform transformation tool in Gimp, but this one also interactively changes the size and applies other geometrical transformations, not only translation and rotation. I see nothing in them to pin the additional parameters.
I want to align the two images by visual inspection, shifting and rotating one of them (e.g. in 50% transparent mode) to the other one for a best fit.
- Did I oversee the right tool in Gimp?
- Or which other standard FOSS tool (and which function in it) do you
recommend for this purpose?
Adalbert Hanßen
(303 rep)
Dec 11, 2024, 10:03 PM
0
votes
1
answers
47
views
Why does graphics tablet pressure work for press but not release?
I'm using a Wacom GD-0912-U graphics tablet. I'm running Debian 12.5 and Gimp 2.10.34. In Gimp, when I touch the pointed end of the pen to the tablet, it registers as a press. But when I lift the pen, the release isn't registered until the pen is about 2.5cm off the tablet. The eraser end of the pen...
I'm using a Wacom GD-0912-U graphics tablet. I'm running Debian 12.5 and Gimp 2.10.34.
In Gimp, when I touch the pointed end of the pen to the tablet, it registers as a press. But when I lift the pen, the release isn't registered until the pen is about 2.5cm off the tablet.
The eraser end of the pen works fine, however. The release occurs as soon as I lift the pen.
What can I do to make the pointed end work the same way?
Marnanel Thurman
(8759 rep)
Jun 9, 2024, 12:11 AM
• Last activity: Jun 9, 2024, 07:24 PM
0
votes
0
answers
201
views
Imagemagick, how to remove a stamp and marks from an image?
The scanned document image (grayscale) have two handwritten marks on the top and seal stamp at the bottom. I want to remove these marks and seal by replace them (hide) with same size rectangles, copied from another region of the image (part of background). How to do this with Imagemagick? Most impor...
The scanned document image (grayscale) have two handwritten marks on the top and seal stamp at the bottom. I want to remove these marks and seal by replace them (hide) with same size rectangles, copied from another region of the image (part of background). How to do this with Imagemagick? Most important, how to get coordinates of these objects and rectangles? (areas where the background should be copied from).
IM v6.9 on Debian.

minto
(575 rep)
Jul 26, 2023, 11:19 PM
• Last activity: Nov 2, 2023, 07:33 PM
5
votes
3
answers
965
views
Install an older version of Gimp on a newer OS
I've been trying to downgrade to Gimp 2.8.22 on Linux Mint 20, which is based on Ubuntu 20. I have been unable to find pre-made binaries for Linux (though [plenty exist for Windows and Mac](https://download.gimp.org/gimp/v2.8/)). The narrative goes "Simply compile the source!" but I am unable to do...
I've been trying to downgrade to Gimp 2.8.22 on Linux Mint 20, which is based on Ubuntu 20. I have been unable to find pre-made binaries for Linux (though [plenty exist for Windows and Mac](https://download.gimp.org/gimp/v2.8/)) . The narrative goes "Simply compile the source!" but I am unable to do this because a few dependencies (such as gegl 0.2) are apparently not available for modern Ubuntu-based systems.
Does anyone know of a way to get Gimp 2.8.22 on newer Linux systems? Hopefully something statically linked? Or at least have a guide on building this given modern constraints? I have tortured myself with Gimp 2.10 for the last two years thinking one day I'll enjoy it. But the more I use this software the more I fear I'll finally break and inject myself with hydrogen cyanide while laughing hysterically.
aggregate1166877
(880 rep)
Sep 22, 2023, 03:43 AM
• Last activity: Oct 4, 2023, 10:02 AM
5
votes
2
answers
1631
views
On Screen Protractor
A handy program for measuring the pixel dimensions of something on-screen is screen ruler: sudo apt install screenruler ; screenruler I like how you can place it anywhere on your screen and it stays on top of all other applications as you use it. I'm hoping to find something similar to this that's a...
A handy program for measuring the pixel dimensions of something on-screen is screen ruler:
sudo apt install screenruler ; screenruler
I like how you can place it anywhere on your screen and it stays on top of all other applications as you use it.
I'm hoping to find something similar to this that's a protractor instead of a ruler.
I searched for "protractor" in the repository of Debian 11 and got no results:
sudo apt-cache search "protractor"
Such a tool would be great for measuring angles on-screen. However, ultimately, I will likely need something that can actually draw a line based on a specified angle.
Hopefully I won't have to learn something as sophisticated as AutoCad in order to accomplish this. What's the simplest way to measure and draw angles in Linux?
Lonnie Best
(5415 rep)
Nov 15, 2022, 03:58 PM
• Last activity: Jun 12, 2023, 11:09 AM
68
votes
4
answers
67861
views
How to rotate a set of pictures from the command line?
I have a large set of JPEG pictures all with the same resolution. It would take too long to open each one inside the graphical interface of imagemagic or gimp. How do I achieve each picture being rotated and saved as the same filename?
I have a large set of JPEG pictures all with the same resolution. It would take too long to open each one inside the graphical interface of imagemagic or gimp.
How do I achieve each picture being rotated and saved as the same filename?
sharkant
(3810 rep)
May 17, 2017, 11:29 AM
• Last activity: May 25, 2023, 05:02 PM
4
votes
3
answers
5502
views
Automatically restoring verticality of the edges of a scanned photo
I want to scan a collection of rectangular photos, both color and black-and-white. I am generally quite happy with the scanning, but I run into some practical problems, due to the fact that photos are placed by hand and may not be well aligned with the scanning canvas (or the edges of the scanner) I...
I want to scan a collection of rectangular photos, both color and black-and-white.
I am generally quite happy with the scanning, but I run into some
practical problems, due to the fact that photos are placed by hand and may not be well
aligned with the scanning canvas (or the edges of the scanner)
I assume that my photo has been scanned into a white background
rectangle containing the rectangular picture I want, possibly not
aligned with the edge of the white rectangle.
Is there an application (preferably running on Linux) that can rotate
automatically the scan so that the picture edges are
horizontal/vertical? If it also crop out the surrounding white
background, it is even better (though proper Unix design would separate this issue).
I know how to do that by hand with Gimp, checking the rotation with my
eyes. But I would like to have it done automatically.
To make things clearer with actual images: given the first image below with the irregular white border, I would like to automatically extract the second one, without any surrounding white.
Note: I had to add the dashed-line to show the edges of the first image.
If you want to test a proposed solution for the automatic extraction, you should rather
.



babou
(878 rep)
Jul 8, 2018, 09:23 PM
• Last activity: Feb 5, 2022, 07:53 PM
0
votes
1
answers
86
views
GIMP on Linux Mint opens but does not work
In Linux Mint, the Gimp installed by the "Software Manager" opens but does not work. When you are going to paint something, the brush freezes, as shown in image below. The brush does not accompany the mouse pointer and is frozen at the screen edge. You can select the tools, but you can't paint. When...
In Linux Mint, the Gimp installed by the "Software Manager" opens but does not work. When you are going to paint something, the brush freezes, as shown in image below. The brush does not accompany the mouse pointer and is frozen at the screen edge. You can select the tools, but you can't paint. When the operating system was installed and Gimp was installed soon after, it did not give a problem, so it must be a conflict with another program.

Denis da Mata
(153 rep)
Aug 22, 2021, 10:22 PM
• Last activity: Aug 22, 2021, 11:02 PM
0
votes
1
answers
178
views
Gimp: Cut And Paste Rectangle on New Layer
I have an image open. I then made a rectangle. I then cut out the rectangle. I then created a New Layer called loveLanguage. I am now trying to paste the contents of the cut-rectangle it onto this New Layer I created but gimp isn't doing what I'm expecting it to do. I am learning here. How Do I past...
I have an image open. I then made a rectangle. I then cut out the rectangle. I then created a New Layer called loveLanguage. I am now trying to paste the contents of the cut-rectangle it onto this New Layer I created but gimp isn't doing what I'm expecting it to do. I am learning here. How Do I paste the contents of the rectangle so I can save the contents of the rectangle as it's own image.

mister mcdoogle
(505 rep)
Apr 22, 2021, 03:33 PM
• Last activity: Apr 22, 2021, 04:21 PM
1
votes
2
answers
4562
views
Making concentric circles in GIMP
I have a single layer image that is 480px square, which I am created with GIMP (it is blank). How can I make: 1. Three concentric circles (the center being at 240,240 px) with radii 240, 180, and 60. 2. Impose a 120px square .png image into the smallest circle, with the center of the circle matching...
I have a single layer image that is 480px square, which I am created with GIMP (it is blank). How can I make:
1. Three concentric circles (the center being at 240,240 px) with radii 240, 180, and 60.
2. Impose a 120px square .png image into the smallest circle, with the center of the circle matching 60,60 px in the image, and cut of the parts of the image that don't fit in the circle.
3. Type in some text and have it wrap around in a circle between the outermost and middle circles.
Honestly, this is the only time I plan to use this software, and it is very confusing to me.
Griffin Young
(193 rep)
Mar 17, 2016, 09:48 PM
• Last activity: Apr 11, 2021, 04:18 PM
1
votes
2
answers
1369
views
How to Install flatpak on Linux Mint 17.1
GIMP 2.10 came out and I'm really excited to use it. The website suggests installing it with flatpak. According to flatpak's website, Linux Mint 18 and forward have it already installed, but as I'm using Linux Mint 17.1, I do not have it. I tried following the Ubuntu installation requirements for fl...
GIMP 2.10 came out and I'm really excited to use it. The website suggests installing it with flatpak. According to flatpak's website, Linux Mint 18 and forward have it already installed, but as I'm using Linux Mint 17.1, I do not have it.
I tried following the Ubuntu installation requirements for flatpak, as well as some other forums, which suggest entering the following into the terminal:
apt add-repository ppa:alexlarsson/flatpak
apt update
apt install flatpak
After entering the last command, the terminal prints out:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package flatpak
Any ideas on how I can install flatpak or GIMP 2.10 without using flatpak?
Anson Savage
(180 rep)
May 16, 2018, 06:10 PM
• Last activity: Jan 8, 2021, 06:27 PM
0
votes
0
answers
42
views
How to move GIMP to another virtual desktop?
When I need GIMP to open in another virtual desktop, I must switch the desktop just after opening GIMP, before it loads. Otherwise I am not able to move all its dialogs, only the main window. Is there a way to easily move all GIMP windows and dialogs at once to another virtual desktop in KDE? (I had...
When I need GIMP to open in another virtual desktop, I must switch the desktop just after opening GIMP, before it loads. Otherwise I am not able to move all its dialogs, only the main window. Is there a way to easily move all GIMP windows and dialogs at once to another virtual desktop in KDE? (I had the same problem in other DEs, too).
Juraj
(101 rep)
Dec 7, 2020, 04:58 PM
1
votes
2
answers
851
views
Help correcting gimp font size
I'm using X1C gen 7 4k, xfce, lightdm, uefi & grub install > Arch wiki wrote: > > Gimp 2.10 To fix toolbar icon sizes, update > Preferences->Interface->Icon Theme->Custom icon size to huge or other > value. If menu fonts are still too small you can update an existing > theme by copying it from /usr/...
I'm using X1C gen 7 4k, xfce, lightdm, uefi & grub install
> Arch wiki wrote:
>
> Gimp 2.10 To fix toolbar icon sizes, update
> Preferences->Interface->Icon Theme->Custom icon size to huge or other
> value. If menu fonts are still too small you can update an existing
> theme by copying it from /usr/share/gimp/2.0/themes into
> ~/.config/GIMP/2.10/themes/ and changing gtk-font-name and font_name
> in gtkrc into something bigger like Sans 30. Then select the new theme
> from Preferences > Interface > Theme. When copying make sure to rename
> the new directory into something different from the original name
> (example Dark > DarkHighDPI). You can also try using gimp-hidpi
> (installation instructions are outdated and refer to version 2.8, in
> Gimp 2.10 the theme should be installed into
> ~/.config/GIMP/2.10/themes/)
I've done all the above to no avail, nothing changed. I'm not sure where to go from here.
What I did exactly was:
1. changed the settings in preferences and made the icon size huge.
2.
mkdir ~/.config/GIMP/2.10/themes/DarkHighDPI
3. from within
/usr/share/gimp/2.0/themes/Dark
I
sudo cp -r gtkrc ui ~/.config/GIMP/2.10/themes/DarkHighDPI
4. I edited the gtkrc file with sans 30 for both the gtk-font-name and font_name
5. Then from within the gimp program again I changed the theme settings to DarkHighDPI
6. rebooted my laptop started gimp, still no change.
7. I restored a timeshift backup to revert all changes I had made.
Dropinthesea
(21 rep)
Oct 27, 2020, 07:17 PM
• Last activity: Oct 27, 2020, 11:50 PM
-1
votes
2
answers
1656
views
Does adobe distribute acrobat reader for Linux platforms?
First things first - If I got it right, the Linux folks might like adobe alternatives like GIMP (instead of Photoshop) etc to work with images/pdf/videos on Linux. So they might never miss adobe products on Linux. But what brings me to this question is - i found a article which describes on: [How to...
First things first - If I got it right, the Linux folks might like adobe alternatives like GIMP (instead of Photoshop) etc to work with images/pdf/videos on Linux. So they might never miss adobe products on Linux.
But what brings me to this question is - i found a article which describes on: How to Install Adobe Acrobat Reader on Ubuntu 20.04 Focal Fossa Linux
I was surprised, because as per my understanding, none of adobe products are available for linux platforms (correct me if I am wrong ). Then I though Acrobat Reader might be an exception and checked on adobe site. My finding is as captured on the screenshot. --> No, there is no Linux Version of acrobat reader on adobe site.
1) I want to understand how ftp://ftp.adobe.com/pub/adobe/reader/unix/9.x/9.5.5/enu/AdbeRdr9.5.5-1_i386linux_enu.deb exists when adobe does not show it on their website (ok even unix version is not listed on there website).
2) Like Acrobat Reader, are there any other products like Flash etc that can obtained through FTP.

samshers
(738 rep)
Sep 10, 2020, 09:16 AM
• Last activity: Sep 10, 2020, 10:42 AM
7
votes
5
answers
6698
views
How to convert multiple XCF files to PNG?
I have a folder with a lot of `xcf` files which I want all to be converted to `png` files, at best via a one-liner from bash. How can I achieve such a task?
I have a folder with a lot of
xcf
files which I want all to be converted to png
files, at best via a one-liner from bash.
How can I achieve such a task?
k0pernikus
(16501 rep)
Apr 14, 2013, 11:52 PM
• Last activity: Aug 29, 2020, 07:01 PM
1
votes
2
answers
274
views
Gimp misses libraries after installing a compiled version and removing the package
I was trying to remove the older Gimp version in order to install the latest version on my Ubuntu 14.04, I've compiled and installed it. When I start gimp, it says that it was installed in the same directory(/usr/lib) and conflicts with the older one. I removed the package using both ``` apt-get pur...
I was trying to remove the older Gimp version in order to install the latest version on my Ubuntu 14.04, I've compiled and installed it. When I start gimp, it says that it was installed in the same directory(/usr/lib) and conflicts with the older one. I removed the package using both
apt-get purge gimp*
and
apt-get autoremove
If I do:
dpkg -l gimp
it says that it isn't installed, but if I type gimp in the terminal, the following message appears:
gimp: symbol lookup error:
gimp: undefined symbol:
gimp: symbol lookup error:
gimp: undefined symbol: g_type_check_instance_is_fundamentally_a
How can I remove it in order to do a fresh installation?
user3376624
(11 rep)
Dec 16, 2015, 10:42 PM
• Last activity: Aug 5, 2020, 09:47 AM
Showing page 1 of 20 total questions