Thumbnails for .dds in SpaceFM - doesn't work

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
murrumba
Posts: 5
Joined: 2017-11-26T13:56:57-07:00
Authentication code: 1152

Thumbnails for .dds in SpaceFM - doesn't work

Post by murrumba » 2017-11-26T14:02:08-07:00

Hi! I'm trying to set automatical .dds thumbnails generating in SpaceFM file manager.
It is working only in Nautilus and nowhere else. I use:

Code: Select all

cat /usr/share/thumbnailers/dds.thumbnailer
[Thumbnailer Entry]
Exec=/usr/bin/convert -thumbnail x%s %i png:%o
MimeType=image/x-dds;
Currently I use this in terminal:

Code: Select all

mkdir preview && mogrify -format png -path preview -thumbnail 96 *.dds
But it is very uncomfortable.

1) What file and where should I create in order to make .dds thumbnails work in SpaceFM?
2) Some .dds files with "normal maps" cannot be processed. In terminal mogrify processes all files and creates few black .png files with warning, but convert just stops. Example:

Code: Select all

convert: image type not supported `tx_hlaalu_ceiling_01_n.dds' @ error/dds.c/ReadUncompressedRGB/2156.
What should I add to avoid this stoppage?

Already looked here:
http://nowcodingtime.blogspot.ru/2013/0 ... buntu.html
https://www.cyberciti.biz/tips/howto-li ... rompt.html
http://www.imagemagick.org/Usage/thumbnails/#creation
---
ImageMagick 6.9.9-23 Q16 x86_64 2017-11-12
Arch Linux 4.9.65-1-lts

User avatar
fmw42
Posts: 22671
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Thumbnails for .dds in SpaceFM - doesn't work

Post by fmw42 » 2017-11-26T14:53:47-07:00

Does this work in command line?

Code: Select all

convert tx_hlaalu_ceiling_01_n.dds tx_hlaalu_ceiling_01_n.png
if not, then does this work?

Code: Select all

convert DDS:tx_hlaalu_ceiling_01_n.dds tx_hlaalu_ceiling_01_n.png

murrumba
Posts: 5
Joined: 2017-11-26T13:56:57-07:00
Authentication code: 1152

Re: Thumbnails for .dds in SpaceFM - doesn't work

Post by murrumba » 2017-11-27T05:24:22-07:00

Does this work in command line? if not, then does this work?
These both doesn't work at all with some .dds files. When i converting a hundred files, and say 50 converted OK, but at 51 convert gives error and stops. The rest 49 images leaved unconverted.

Convert don't creates .dds thumbnails in SpaceFM. Can you help me with that?

Bonzo
Posts: 2910
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Thumbnails for .dds in SpaceFM - doesn't work

Post by Bonzo » 2017-11-27T05:32:16-07:00

Is it always the same file that fails?
What happens if you run say 33 files, then the next 33 and the final 34?
What is Space FM - if it works elsewhere it may be a problem with the way Space FM is setup

murrumba
Posts: 5
Joined: 2017-11-26T13:56:57-07:00
Authentication code: 1152

Re: Thumbnails for .dds in SpaceFM - doesn't work

Post by murrumba » 2017-11-27T09:19:15-07:00

is it always the same file that fails?
Of course not. Problem only with files like this: http://philipk.net/ndo/generalExamples.jpg
Almost all of them converts fine, but few resulted with black .png and error.
may be a problem with the way Space FM is setup
Yes, it is. I created this topic in hope that somebody familiar with both ImageMagick and SpaceFM knew something. Or with Xfe.

By the way, maybe somebody need this. DDS thumbnails for Thunar, PcmanFM and Nemo:
Install tumbler, imagemagick, create /usr/share/thumbnailers/dds.thumbnailer as mentioned above, then:

Code: Select all

cp /etc/xdg/tumbler/tumbler.rc /home/username/.config/tumbler/
nano /home/username/.config/tumbler/tumbler.rc
Add these lines:

Code: Select all

# dds.thumbnailer
[DssThumbnailer]
Disabled=false
Priority=1
Locations=
MaxFileSize=0
Everything should working fine now.
Last edited by murrumba on 2017-11-28T13:43:45-07:00, edited 1 time in total.

User avatar
fmw42
Posts: 22671
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Thumbnails for .dds in SpaceFM - doesn't work

Post by fmw42 » 2017-11-27T11:03:11-07:00

Did my convert (not mogrify) commands work when running one image at a time? Were there any images that fail consistently? If so, post one of them to some free hosting service and put the URL here so we can examine it and test ourselves.

Are you trying to convert more than one file at a time? If so, you may be running out of space on your temp (tmp) directory.

murrumba
Posts: 5
Joined: 2017-11-26T13:56:57-07:00
Authentication code: 1152

Re: Thumbnails for .dds in SpaceFM - doesn't work

Post by murrumba » 2017-11-28T14:17:21-07:00

post one of them to some free hosting service
https://www.dropbox.com/sh/w9veof38dy9j ... tuSfa?dl=0
01,02,03 - convert gives error, thumbnails are black, but xnvewmp opens them easyly.
04 - convert gives two pngs, thumbnail not created, xnvewmp can't open it.
To bestia: why are you posting exactly the same phrase by DiegoMG from this page?
http://assettocorsamods.net/threads/thu ... lorer.718/
Thumbnails in Windows works alright. In Linux it is more complicated.

User avatar
fmw42
Posts: 22671
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Thumbnails for .dds in SpaceFM - doesn't work

Post by fmw42 » 2017-11-28T15:52:06-07:00

I tried converting using IM 6.9.9.23 Q16 Mac OSX

Code: Select all

convert DDS:01.dds 01.png
convert: image type not supported `01.dds' @ error/dds.c/ReadUncompressedRGB/2156.

Mac Preview won't open it and says it is corrupt or unknown file type. GraphicConvert opens it fine. GIMP says unknown image type.

murrumba
Posts: 5
Joined: 2017-11-26T13:56:57-07:00
Authentication code: 1152

Re: Thumbnails for .dds in SpaceFM - doesn't work

Post by murrumba » 2017-12-01T12:03:58-07:00

Yep. Error...2156. Game (OpenMW) can load these images, bump-mapping is working allright, but GIMP just can't open some of them. I have many texture mods and there are quite a lot of such strange .dds
Mac Preview shouldn't open any DDS - it is the format of the sworn enemy. And thumbnails isn't a problem at all: https://github.com/Marginal/QLdds On mac I use old open source Xee 2.X and Xnview. They are much faster, have better UI, and can open pretty much anything.
With the solution above .dds thumbnails work ok in Nautilus, Thunar, Caja, Nemo, Pcmanfm. Didn't try Dolphin. But SpaceFM is out of luck. Sad. Answer lies, probably, with modifying this:
https://github.com/IgnorantGuru/spacefm ... l-loader.h
Case closed, I guess.

Post Reply