(Solved) GIMP Thumbnails?

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
ITSMERSH

(Solved) GIMP Thumbnails?

#1 Post by ITSMERSH »

Is there any possibility to get the thumbnails from .xcf GIMP images showing its content (how the image looks, like at .png e.g.)?

1. I want to see them within the Rox filer window.

2. I want to look at them in a gtkdialog GUI.

Any hints/solutions on this available somewhere?
Last edited by ITSMERSH on Fri 30 Nov 2018, 15:25, edited 1 time in total.

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#2 Post by vovchik »

Dear ITSMERSH,

I think what you want is a gdk pixbuf loader for xcf flies. There is one here:

https://github.com/StephaneDelcroix/xcf-pixbuf-loader

GTK apps making use of gdk_pixbuf_loader will then be able to display that file type.

With kind regards,
vovchik

p310don
Posts: 1492
Joined: Tue 19 May 2009, 23:11
Location: Brisbane, Australia

#3 Post by p310don »

I don't have an actual hint / solution, except to say that I use Battleshooter's Carolina Vanguard Puppy at work (based on Saluki by Jemimah), and it displays a thumbnail of xcf files from GIMP (also pdfs and videos). It uses XFCE which is obviously different to ROX, but there may be some hints there.

User avatar
davids45
Posts: 1326
Joined: Sun 26 Nov 2006, 23:33
Location: Chatswood, NSW

Export to png or jpg?

#4 Post by davids45 »

G'day RSH,

I don't understand what you really want but if all you need is a simple .png or .jpg file from the Gimp's .xcf, and in case you are not aware of the options, I use the 'Export' option in the Gimp menu to obtain a usable image file from Gimp's working file.

David S.

ITSMERSH

#5 Post by ITSMERSH »

vovchik wrote:Dear ITSMERSH,

I think what you want is a gdk pixbuf loader for xcf flies. There is one here:

https://github.com/StephaneDelcroix/xcf-pixbuf-loader

GTK apps making use of gdk_pixbuf_loader will then be able to display that file type.

With kind regards,
vovchik
Thanks for the link!

Downloaded the package, extracted, opened a teminal in window and tried to compile.

- no configure script
- script autogen.sh complains about missing configure script

So, nothing to do for me on that source code...

@p310don

Yes, I know other file managers can display thumbs of .xcf files. Though, Rox doesn't seem to do so.

Displaying video thumbnails has been solved so far by installing the ZeroInstall package for Rox filer.

@davids45

Thanks, but no, I just don't want simple thumbnails manually created by exporting from GIMP. Just like the e.g. .png or .jpg thumbnails are displayed (not an icon, but the real image) I want to see the thumbnails from .xcf images in Rox, but also in a GtkDialog GUI of my program.

At least the gtkdialog gui part is on top of that list.

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#6 Post by MochiMoppel »

The pixbuf loader posted by user Argolance works for me. Links to the source code are dead though.

User avatar
perdido
Posts: 1528
Joined: Mon 09 Dec 2013, 16:29
Location: ¿Altair IV , Just north of Eeyore Junction.?

#7 Post by perdido »

MochiMoppel wrote:The pixbuf loader posted by user Argolance works for me. Links to the source code are dead though.
This may be the source
https://github.com/StephaneDelcroix/xcf-pixbuf-loader

.

ITSMERSH

#8 Post by ITSMERSH »

perdido wrote:
MochiMoppel wrote:The pixbuf loader posted by user Argolance works for me. Links to the source code are dead though.
This may be the source
https://github.com/StephaneDelcroix/xcf-pixbuf-loader

.
No, this is the source code without the configure script i tried already.

ITSMERSH

#9 Post by ITSMERSH »

MochiMoppel wrote:The pixbuf loader posted by user Argolance works for me. Links to the source code are dead though.
I tried to put this into /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders and executed gdk-pixbuf-query-loaders. Though nothing changed.

In Rox the thumbs for GIMP .xcf images still showing the GIMP icon.

In my gtkdialog gui it shows the gtk-missing-image icon instead.

I tried to put this into /usr/lib and executed gdk-pixbuf-query-loaders. Also nothing changed, equal results.

What am I doing wrong here?

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#10 Post by MochiMoppel »

ITSMERSH wrote:I tried to put this into /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders
Good.
and executed gdk-pixbuf-query-loaders.
Bad.
That's not what Argolance suggested. You have to run

Code: Select all

gdk-pixbuf-query-loaders > /etc/gtk-2.0/gdk-pixbuf.loaders
/etc/gtk-2.0/gdk-pixbuf.loaders is a text file and you can check if the new parameters were copied correctly.

Then restart X.

Note that this pixbuf loader may not work for some .xcf files, depending on the GIMP versions with which the images were created.

ITSMERSH

#11 Post by ITSMERSH »

MochiMoppel wrote:
and executed gdk-pixbuf-query-loaders.
Bad.
That's not what Argolance suggested. You have to run

Code: Select all

gdk-pixbuf-query-loaders > /etc/gtk-2.0/gdk-pixbuf.loaders
/etc/gtk-2.0/gdk-pixbuf.loaders is a text file and you can check if the new parameters were copied correctly.
Thanks. I should read more carefully! :lol:

However: the file /etc/gtk-2.0/gdk-pixbuf.loaders didn't exist but was created after executing the above command in terminal.

Restarting X server doesn't change anything. Still no thumbs for .xcf in Rox and still the gtk-missing-image icon in the gtkdialog gui.

Almost all of my GIMP images are created with GIMP Painter 2.8.7 (a special version including brushes from another image editor program (xpaint?, mpaint? can't recall atm.))

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#12 Post by MochiMoppel »

ITSMERSH wrote:However: the file /etc/gtk-2.0/gdk-pixbuf.loaders didn't exist but was created after executing the above command in terminal.
Bad, but not your fault :lol:

Different Puppies use different files for the settings. It's all a bit messy. Please always indicate, which Puppy you are using.

From the beginnig:
1) First make sure to copy libpixbufloader-xcf.so into the right loader directory. You find this directory when you open a console and run

Code: Select all

gdk-pixbuf-query-loaders
The output should start with something like this:

Code: Select all

# GdkPixbuf Image Loader Modules file
# Automatically generated file, do not edit
# Created by gdk-pixbuf-query-loaders from gdk-pixbuf-2.26.1
#
# LoaderDir = /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders
"LoaderDir" is the copy destination for libpixbufloader-xcf.so

2) After you copied the file you can run gdk-pixbuf-query-loaders again. This time the new settings for .xcf files should be included in the output.

3) Now comes the point where your attempt failed. You must redirect the output of gdk-pixbuf-query-loaders to the correct text file. It's obviously not /etc/gtk-2.0/gdk-pixbuf.loaders.
More likely you will find a file called loaders.cache in the parent directory of the "LoaderDir" directory.
In above example this would be /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache., thus your command should be

Code: Select all

gdk-pixbuf-query-loaders > /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
After restarting X ROX-Filer thumbnails worked properly in a tested Dpup Stretch, may work in other Puppies as well.

ITSMERSH

#13 Post by ITSMERSH »

MochiMoppel wrote:3) Now comes the point where your attempt failed. You must redirect the output of gdk-pixbuf-query-loaders to the correct text file. It's obviously not /etc/gtk-2.0/gdk-pixbuf.loaders.
More likely you will find a file called loaders.cache in the parent directory of the "LoaderDir" directory.
In above example this would be /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache., thus your command should be

Code: Select all

gdk-pixbuf-query-loaders > /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
After restarting X ROX-Filer thumbnails worked properly in a tested Dpup Stretch, may work in other Puppies as well.
Yes, I could see the file /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache but did not have a look into it and/or suspected it being the right file.

However, now everything seems to work fine. ROX is now showing the thumbs of .xcf images and my QTR Suite displays a .xcf image in its Welcome tab.

Thank you very much, MochiMoppel. :D

Hats off! 8)
Attachments
Screenshot.jpg
(100.59 KiB) Downloaded 55 times

ITSMERSH

#14 Post by ITSMERSH »

MochiMoppel wrote:3) Now comes the point where your attempt failed. You must redirect the output of gdk-pixbuf-query-loaders to the correct text file. It's obviously not /etc/gtk-2.0/gdk-pixbuf.loaders.
More likely you will find a file called loaders.cache in the parent directory of the "LoaderDir" directory.
In above example this would be /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache., thus your command should be

Code: Select all

gdk-pixbuf-query-loaders > /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
After restarting X ROX-Filer thumbnails worked properly in a tested Dpup Stretch, may work in other Puppies as well.
Hi.

I'm back in my Art Studio (Tahr based) which has /etc/gtk-2.0/gdk-pixbuf.loaders, but has also a symbolic link /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache pointing to /etc/gtk-2.0/gdk-pixbuf.loaders.

Just to mention the difference...

Post Reply