Solved GIMP - PNG files and GMIC unavailable

Solved issue

lymphor

Member
Joined
Jul 16, 2023
Messages
83
Reaction score
43
Credits
807
Hello :)

I'm using GIMP 2.10.34 on Ubuntu 22.04. I also installed GMIC 3.3.1.

My problem is that GIMP doesn't open PNG files (I got an "Unknown file type" error message) and GMIC is not visible. Unless I launch GIMP from terminal, using the command sudo gimp. Then I can open PNG files and I have GMIC.

Another peculiar thing is that, if I launch GIMP from terminal, the version launched is 2.10.30.

So I'm a little bit confused and I would need some help, please.

Thank you in advance!
 
Last edited:


The current stable release of GIMP is 2.10.36.

It sounds like your Ubuntu installation has version 2.10.34 installed however; when you use the command line to launch Gimp it's defaulting to an older version.
I checked the Ubuntu Jammy repository and Gimp 2.10.30 is showing. That explains why the command line is using that version.


The current version of GMIC is 3.3.2 and you have 3.3.1 installed.
Maybe conflicting libraries is the problem.

I downloaded a .png pic of a flame of fire and it launched in Gimp w/o any problems.
My LMDE6 came with version 2.10.34. FWIW, I didn't have to install any plug-ins.

I would launch Synaptic Package Manager and see exactly what version is installed.
Are there additional packages that Gimp needs in the list in your Synaptic PKG MGR?

What is the exact error message you are getting when you try to open a .png?
 

Attachments

  • Gimp 2.10.34.png
    Gimp 2.10.34.png
    62.3 KB · Views: 186
  • Fire.png
    Fire.png
    934.4 KB · Views: 195
I checked in my Synaptic PKG MGR and there are other pkg's that can be installed.
 

Attachments

  • Gimp Synaptic.png
    Gimp Synaptic.png
    197.1 KB · Views: 186
Hello and thank you for replying :)
I've attached to this message a picture of Synaptic and a picture of the error I get when I try to open a PNG file.
 

Attachments

  • Synaptic_Gimp.png
    Synaptic_Gimp.png
    249.5 KB · Views: 214
  • PNG_error.png
    PNG_error.png
    22.8 KB · Views: 199
You're welcome.

Looking at your screenshot of Synaptic,I wouldn't install all of those language packs.
Go through the list and see if there are other packages in that list that Synaptic is showing you and check them with your mouse
and install them....then reboot.

Those additional packages may make a difference.
If not, let me know.
 
Is the PNG really a PNG format file?

Try to open it in Eye of GNOME/MATE, (or in Gwenview in KDE -- EDIT: this is for other people who don't have GNOME since it looks like the topic starter is using "regular" Ubuntu). Other viewers like Shotwell and Viewnior should be able to allow opening PNG. If those don't work the file is not PNG despite the suffix.

GIMP could suddenly refuse to load a file and it has happened to me, and it could depend on the version/release/subrelease. Once I created BMP files right out of it that it refused to load back later and were dud in other programs, which was totally unacceptable to me. I ditched the whole distro that carried this foul "release" of the application. Sadly, one has to be fully updated if possible when confronted with bad error messages like this.

Oh brother, and a PNG file that was supposed to be produced by a screenshooter. Why does it have to create a filename which begins with hyphen? :O
 
G'day @lymphor

The file you are trying to open with GIMP has a space between Fiaticorti and 14.

Linux does not like spaces.

Try renaming the file to eliminate the space or replace the space with an underscore, and try it with GIMP again.

Cheers

Chris Turner
wizardfromoz
 
Go through the list and see if there are other packages in that list that Synaptic is showing you and check them with your mouse
and install them....then reboot.
Done! Unfortunately, nothing changed.
 
Try to open it in Eye of GNOME/MATE, (or in Gwenview in KDE -- EDIT: this is for other people who don't have GNOME since it looks like the topic starter is using "regular" Ubuntu). Other viewers like Shotwell and Viewnior should be able to allow opening PNG. If those don't work the file is not PNG despite the suffix.
I opened the file with both Eye of Gnome and Shotwell, no problems.

Oh brother, and a PNG file that was supposed to be produced by a screenshooter. Why does it have to create a filename which begins with hyphen? :O
I took the screenshot, then I renamed the file :)
 
OK, a couple of questions before my next idea.

1. Did you change the entries in the plug in folder configuration preferences?

* If Gimp can't find the standard plug-ins it won't be able to open most file types.*

2. Is there any chance that the image is corrupt?

3. Have you tried changing the format to xcf to see if it's viewable?
 
It might be worth ensuring you definitely have libpng installed on your system.
Open a terminal and run:
Bash:
apt search libpng —names-only
.

If the output from apt DOES NOT say [installed] next to the name of the main libpng package - then you will need to install libpng.
Bash:
sudo apt install libpng

But if it says that libpng IS installed, and GIMP still cannot load a valid .png file, then it may have something to do with the fact that Gimp is a snap application in Ubuntu. Perhaps the snap was compiled without png support built in?! Or is corrupt? Or misconfigured somehow? IDK?!

On Debian, I was an early adopter of snapcraft. But I gave up using it after a couple of months.
Snaps are a terrible solution for the problem of "Universal packaging" IMO. I’m NOT a fan of snapcraft/snaps at all.

I was extremely disappointed (but not at all surprised) when Canonical decided to force snapcraft onto its users and started replacing some of their Debian packages with meta-packages that install snaps.
 
1. Did you change the entries in the plug in folder configuration preferences?
No.

2. Is there any chance that the image is corrupt?
I opened it fine with Eye of Gnome and Shotwell, so I think the file's fine.
I also tried to open other PNG files and I get the same error.

3. Have you tried changing the format to xcf to see if it's viewable?
I did that and when I try to open the file I get the following error message:
"Opening '/home/ale/Pictures/Screenshots/Fiaticorti14.xcf' failed: GIMP XCF image plug-in could not open image"
 
It might be worth ensuring you definitely have libpng installed on your system.
Open a terminal and run:
Bash:
apt search libpng —names-only
.

If the output from apt DOES NOT say [installed] next to the name of the main libpng package - then you will need to install libpng.
Bash:
sudo apt install libpng

But if it says that libpng IS installed, and GIMP still cannot load a valid .png file, then it may have something to do with the fact that Gimp is a snap application in Ubuntu. Perhaps the snap was compiled without png support built in?! Or is corrupt? Or misconfigured somehow? IDK?!

On Debian, I was an early adopter of snapcraft. But I gave up using it after a couple of months.
Snaps are a terrible solution for the problem of "Universal packaging" IMO. I’m NOT a fan of snapcraft/snaps at all.

I was extremely disappointed (but not at all surprised) when Canonical decided to force snapcraft onto its users and started replacing some of their Debian packages with meta-packages that install snaps.
Thanks for chiming in.

After learning from a dev that maintains the snap pkg for Retro Arch he explained that some of the snap pkg's don't recognize the input / output of devices. When the snap wouldn't work for me I installed the flatpak and it was off to the races.

It could be that the snap doesn't have png support, misconfigured or corrupt like you said.
Like you, IDK either.

Perhaps the flatpak will have everything OP needs.
 
Last edited:
No.


I opened it fine with Eye of Gnome and Shotwell, so I think the file's fine.
I also tried to open other PNG files and I get the same error.


I did that and when I try to open the file I get the following error message:
"Opening '/home/ale/Pictures/Screenshots/Fiaticorti14.xcf' failed: GIMP XCF image plug-in could not open image"
Thanks for answering those questions.

Open your terminal and run this command.
Code:
dpkg -L libpng

If your terminal returns that "libpng" is not installed then install it: like JasKinasis suggested:-
 
It might be worth ensuring you definitely have libpng installed on your system.
Open a terminal and run:
Bash:
apt search libpng —names-only
.
The output is:
Sorting... Done
Full Text Search... Done

If the output from apt DOES NOT say [installed] next to the name of the main libpng package - then you will need to install libpng.
Bash:
sudo apt install libpng
The output is:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package libpng

Perhaps the snap was compiled without png support built in?! Or is corrupt? Or misconfigured somehow? IDK?!
What puzzles me is that if I select an image file and chose to open it with GIMP, I have version 2.10.34 of GIMP. If instead I open the program directly from terminal, I have version 2.10.30 of GIMP.
I somehow have 2 installations of GIMP :/
 
Thanks for answering those questions.
Hey, I'm the one that has to thank you all for your help and support! :)

Open your terminal and run this command.
Code:
dpkg -L libpng
The output is:
dpkg-query: package 'libpng' is not installed
Use dpkg --contents (= dpkg-deb --contents) to list archive files contents.

If your terminal returns that "libpng" is not installed then install it: like JasKinasis suggested:-
I tried, but no success. The output is:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package libpng
 
The output is:
Sorting... Done
Full Text Search... Done


The output is:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package libpng


What puzzles me is that if I select an image file and chose to open it with GIMP, I have version 2.10.34 of GIMP. If instead I open the program directly from terminal, I have version 2.10.30 of GIMP.
I somehow have 2 installations of GIMP :/

Having 2 version's installed is most likely the culprit causing the conflict.

You may want to find out if those versions of Gimp are snap packages or flatpak package. These commands should help.

Code:
flatpak list | grep <app-name>

snap list <app-name>

The executables of snap applications are under /snap/bin/. For example, /snap/bin/firefox will launch the snap version.

If you continue to have problems you could remove all versions of Gimp including all of the configurations files.
Then start with a fresh installation.
That's what I would do if this was my Ubuntu installation.:)
 
I have no idea what's going on in the thread.

There is no 'libpng' - but there are a bunch of libpng candidates.

Code:
apt-cache search libpng
 
I have no idea what's going on in the thread.

There is no 'libpng' - but there are a bunch of libpng candidates.

Code:
apt-cache search libpng
That command on my LMDE6 install returns:

Code:
chibicc - small C compiler
fp-units-gfx - Free Pascal - graphics-library units dependency package
fp-units-gfx-3.2.2 - Free Pascal - graphics-library units
jp2a - converts jpg and png images to ascii
libimage-png-libpng-perl - Perl interface to libpng
libpng-dev - PNG library - development (version 1.6)
libpng-tools - PNG library - tools (version 1.6)
libpng16-16 - PNG library - runtime (version 1.6)
libspng-dev - simple, modern libpng alternative - development
libspng-doc - simple, modern libpng alternative - documentation
libspng0 - simple, modern libpng alternative
libusbgx-dev - Development files for libusbgx
libpng++-dev - C++ interface to the PNG (Portable Network Graphics) library
png-definitive-guide - PNG: The Definitive Guide
libpng-sixlegs-java - Sixlegs Java PNG Decoder
libpng-sixlegs-java-doc - Documentation for Sixlegs Java PNG Decoder
libpnglite-dev - lightweight C library for loading and writing PNG images
libpnglite0 - lightweight C library for loading and writing PNG images

OP has 2 versions of Gimp installed (version 2.10.34 and the command-line is using version 2.10.30). It's creating conflict if I'm not mistaken.

Also when OP tries to install libpng the command-line is unable to locate that pkg.
HTH
 

Members online


Latest posts

Top