Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
XCF thumbnails in Nemo (Cinnamon) with Nomacs, meh
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
gorg86
Apprentice
Apprentice


Joined: 20 May 2011
Posts: 299

PostPosted: Wed Jan 05, 2022 7:07 pm    Post subject: XCF thumbnails in Nemo (Cinnamon) with Nomacs, meh Reply with quote

Happy New Year fellow gentooligans,

I wanted to have Gimp/XCF thumbnails in my file explorer (Nemo), so I put /usr/bin/convert (Imagemagick) in my .thumbnailer file.
But half of the time it just throws an exception
Code:
convert: colormap type not supported `Tux.xcf' @ error/xcf.c/ReadXCFImage/1215.
because of this:
https://github.com/ImageMagick/ImageMagick/blob/2747ccfc1044fc3da6d32ff1ebbca5e926fcf602/coders/xcf.c
Code:
  if (image_type == GIMP_INDEXED)
    ThrowReaderException(CoderError,"ColormapTypeNotSupported");

Apparently it doesn't like indexed colormap files...
I'm using Nomacs as a thumbnailer atm. as a workaround
/usr/share/thumbnailers/xcf.thumbnailer:
Code:
[Thumbnailer Entry]
TryExec=/home/username/nomacs_xcf_thumb.sh
Exec=/home/username/nomacs_xcf_thumb.sh %s %i %o
MimeType=image/x-xcf;

nomacs_xcf_thumb.sh:
Code:
#!/bin/bash
echo '[%General]
FileList='$2'
FileNamePattern='$(basename $3)'.png
OutputDirPath='$(dirname $3)'
SaveInfo\Compression=-1
SaveInfo\DeleteOriginal=false
SaveInfo\InputDirIsOutputDir=false
SaveInfo\Mode=0
TransformBatch\Angle=0
TransformBatch\CorrectGamma=false
TransformBatch\CropFromMetadata=false
TransformBatch\CropRectangle="0,0,0,0"
TransformBatch\IplMethod=1
TransformBatch\Mode=3
TransformBatch\Property=1
TransformBatch\ScaleFactor=@Variant(\0\0\0\x87\x43\x80\0\0)' > /tmp/xcf.fifo
nomacs --batch /tmp/xcf.fifo
mv $3".png" $3


I just ignore the first argument and put in 256px.
I don't like this tho, if someone has a decent solution for this, please let me know.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum