WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: imagemagick not working on x86_64: no encode/decode delegates  (Read 9036 times)

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1499
imagemagick not working on x86_64: no encode/decode delegates
« on: August 20, 2019, 02:20:55 PM »
imagemagick is installed on my TC 10.x x86_64 laptop, but not working. No luck with either screenshots (via import) or shrinking images (via convert):

Code: [Select]
bruno@box:/opt$ import /tmp/screenshot.jpg
import: no encode delegate for this image format `PS' @ error/constitute.c/WriteImage/1235.

bruno@box:/mnt/data/bruno/Pictures$ convert ./sad_panda.jpg -resize 800x600 -quality 80 ./small.jpg
convert: no decode delegate for this image format `JPEG' @ error/constitute.c/ReadImage/560.
convert: no images defined `./small.jpg' @ error/convert.c/ConvertImageCommand/3258.

Any ideas how to fix this? ImageMagick seems complicated and I obviously know too little about it to fix this myself, as I've been going around in circles for hours. All imagemagick.tcz's dependencies are loaded.
« Last Edit: August 20, 2019, 02:23:36 PM by GNUser »

Offline Pats

  • Sr. Member
  • ****
  • Posts: 322
Re: imagemagick not working on x86_64: no encode/decode delegates
« Reply #1 on: August 20, 2019, 07:56:38 PM »
Repo may have old ver.

ImageMagic errors:
 ..1) Upgrade to latest ver: IM 6.3.2 is too old.  *https://www.imagemagick.org/discourse-server/viewtopic.php?t=14204

 ...2) Not tried, but thru Env var path : *https://stackoverflow.com/questions/37594157/imagemagick-no-decode-delegate-for-this-image-format-error-constitute-c-re :)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14801
Re: imagemagick not working on x86_64: no encode/decode delegates
« Reply #2 on: August 21, 2019, 05:14:08 AM »
I can see that /usr/local/etc/ImageMagick-6/configure.xml is missing, but even with this things don't work:
Code: [Select]
$ convert -version
Version: ImageMagick 6.9.10-42 Q16 x86_64 2019-04-27 https://imagemagick.org
Copyright: © 1999-2019 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules
Delegates (built-in): bzlib cairo djvu fftw fontconfig freetype gslib gvc jng jp2 jpeg lcms ltdl lzma openexr pangocairo png ps raw rsvg tiff webp wmf x xml zlib
..looks OK, but:
Code: [Select]
$ convert -list format
   Format  Module    Mode  Description
-------------------------------------------------------------------------------

* native blob support
r read support
w write support
+ support for multiple images
..seems to be missing any formats.

Offline Pats

  • Sr. Member
  • ****
  • Posts: 322
Re: imagemagick not working on x86_64: no encode/decode delegates
« Reply #3 on: August 21, 2019, 07:39:41 AM »
The version I was using was :

If you type :
convert --help  at prompt,
you may see following :

ImageMagic 6.7.7-10 2014-03-06 Q16 (C) 1999-2012 ImageMagic Studio LLC Features: OpenMP

Usage:
convert.im6

This command was  supporting -adjoin  , -alpha , -antialias , -format , -quality value JPEG, PNG etc , -auto-orient, -flip , -rotate,  -morph etc and so on

.From IM help:
To specify  image format use (colon)  ps:image or (suffix)  image.ps .
Specify 'file' as '-' for standard input or output.

.. Afterusing import command with filename, I was able to select a screen area with mouse. This selected area was combined with the selected file , etc etc.

... While using command with proper *syntacs* . :)

Note: I was using x86-32 !
« Last Edit: August 21, 2019, 07:42:17 AM by Pats »

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1499
Re: imagemagick not working on x86_64: no encode/decode delegates
« Reply #4 on: August 21, 2019, 08:36:52 AM »
I get the same exact output as juanito when I run convert -version and convert -list format

Offline Pats

  • Sr. Member
  • ****
  • Posts: 322
Re: imagemagick not working on x86_64: no encode/decode delegates
« Reply #5 on: August 21, 2019, 09:05:10 AM »
By the way, in  TC10.0 86-32 ver, pl note that , IMagic current repo ver has missing dep of libffi.tcz. .

.. Dnload and load this file with IMagic. And using sudo mc or in command prompt , symlink /usr/local/lib/libffi.so.6  to /lib/libffi.so.5

.. because  import command requires libffi.so.5 . Then use import command.

Offline Pats

  • Sr. Member
  • ****
  • Posts: 322
Re: imagemagick not working on x86_64: no encode/decode delegates
« Reply #6 on: August 21, 2019, 10:31:56 AM »
GNUser wrote:
 
Quote
.. get the same exact output as juanito when I run convert -version and convert -list format


... After symlinking /usr/local/lib/libffi.so.6 to /lib/libffi.so.5 , I get following results :

Code: [Select]
convert -version Version: ImageMagik 6.8.7-0 ... etc
 Features: DPC
Delegates: bzlib cairo
 ~snip~
png tiff xml zlib ... etc ..
.

.. Same with
Code: [Select]
convert -list format
..Format Mode Description
-------------------
3FR r-- Hasselblad CFV/H3D39II
A* rw+ Raw alpha sample
~snip~
a long list of supported format etc ...

+ support for multiple images


 ... Hope this helps ! :)

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1499
Re: imagemagick not working on x86_64: no encode/decode delegates
« Reply #7 on: August 21, 2019, 10:48:14 AM »
Pats, which version of TC are you using? I think you are using the 32bit version.

In TC 10.1 32bit when I try using import I get an error about libffi missing. After installing libffi.tcz in TC 10.1 32bit, all the ImageMagick commands work just fine.

My problem in 64bit is different. Neither the import nor convert work because of missing encode/decode delegates. Presumably after I manage to fix the delegates problem, then I'll need to fetch the missing library for the import command. So please help me get convert to work in 64bit, since it already has all the required libraries.
« Last Edit: August 21, 2019, 10:55:47 AM by GNUser »

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1499
Re: imagemagick not working on x86_64: no encode/decode delegates
« Reply #8 on: August 21, 2019, 01:52:03 PM »
Never mind. I found workarounds for my needs: ffmpeg to compress images, scrot to take screenshots.
With the appropriate flags, these two are drop-in replacements for convert and import.

I love ffmpeg. There seems it can handle just about anything when it comes to media files ;D
scrot and its dependency I had to cook up on my own. I'll package it properly for the x86_64 repository sometime in the next few days.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1499
Re: imagemagick not working on x86_64: no encode/decode delegates
« Reply #9 on: October 08, 2019, 01:58:02 PM »
I found an additional workaround: The latest gcc-x86_64 AppImage available here works perfectly on Pure64 10.1

Offline caminati

  • Full Member
  • ***
  • Posts: 184
    • Homepage
Re: imagemagick not working on x86_64: no encode/decode delegates
« Reply #10 on: October 06, 2020, 07:48:19 PM »
I found an additional workaround: The latest gcc-x86_64 AppImage available here works perfectly on Pure64 10.1

Thank you, that was very useful!
Marco
PS: the problem is still there with imagemagick.tcz from corepure 10.1, no other workarounds worked for me.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14801
Re: imagemagick not working on x86_64: no encode/decode delegates
« Reply #11 on: October 07, 2020, 10:31:39 AM »
The *.la files are needed in the convert directory for things to work - I should have realised this as libltdl is a dep.

Updated imagemagick posted.

Offline caminati

  • Full Member
  • ***
  • Posts: 184
    • Homepage
Re: imagemagick not working on x86_64: no encode/decode delegates
« Reply #12 on: October 19, 2020, 05:55:31 PM »
The *.la files are needed in the convert directory for things to work - I should have realised this as libltdl is a dep.

Updated imagemagick posted.

Sounds good, thanks!