gorg86 Apprentice
Joined: 20 May 2011 Posts: 299
|
Posted: Wed Jan 05, 2022 7:07 pm Post subject: XCF thumbnails in Nemo (Cinnamon) with Nomacs, meh |
|
|
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. |
|