Comments (9)
How odd. What version of ImageMagick are you running?
convert --version
Are you able to view the images using convert
?
convert test.png -geometry 800x500 sixel:-
If so, does it only break when using the file: URI?
convert file://contents.png -geometry 800x500 sixel:-
If that fails, please try it with the full work directory:
convert file://`pwd`/contents.png -geometry 800x500 sixel:-
Thank you for the bug report.
from lsix.
@hackerb9 Thank you for responding.
convert --version
Version: ImageMagick 6.9.10-23 Q16 x86_64 20190101 https://imagemagick.org
Copyright: © 1999-2019 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png tiff webp wmf x xml zlib
No news is good news in Linux, so the following command works:
convert test.png -geometry 800x500 sixel:-
It looks like a path issue:
convert file://contents.png -geometry 800x500 sixel:-
convert-im6.q16: unable to open image `file://contents.png': No such file or directory @ error/blob.c/OpenBlob/2874.
convert-im6.q16: no images defined `sixel:-' @ error/convert.c/ConvertImageCommand/3258.
Feeding the full path also doesn't work:
convert file://`pwd`/contents.png -geometry 800x500 sixel:-
convert-im6.q16: unable to open image `file:///home/****/Desktop/01-2022/contents.png': No such file or directory @ error/blob.c/OpenBlob/2874.
convert-im6.q16: no images defined `sixel:-' @ error/convert.c/ConvertImageCommand/3258.
from lsix.
I think it stems from the policy files in /etc/ImageMagick-6/
as suggested here https://askubuntu.com/questions/1181762/imagemagickconvert-im6-q16-no-images-defined
I played with the settings in /etc/ImageMagick-6/policy.xml
.
I allowed path
and url
in the policy.xml
but it didn't work. I even completely removed that file but nothing's changed.
I've just built ImageMagick
from github source and it works well.
from lsix.
I'm glad ImageMagick works from source, but it's very weird that it doesn't work out of the box. I'd like to track that down.
I've examined Ubuntu's ImageMagick configuration files and it doesn't look like it has anything odd in the policy file. It hasn't even been updated since June of 2021.
If the problem was with the policy file, I think ImageMagick would not say "No such file or directory". Policy errors usually look like this:
montage-im6.q16: attempt to perform an operation not allowed by the security policy `FILE' @ error/constitute.c/IsCoderAuthorized/421.
Would you please humor me and try reinstalling Ubuntu's version then send me the output from these two commands?
This first one should work fine since it doesn't use file://
at all:
convert -debug all test.png -geometry 800x500 sixel:-
This second one should fail:
convert -debug all file://test.png -geometry 800x500 sixel:-
Thanks!
from lsix.
/usr/bin/convert -debug all test.png -geometry 800x500 sixel:-
works well again but output of its debug very long.
I post debug output of failing one:
/usr/bin/convert -debug all file://test.png -geometry 800x500 sixel:-
2022-01-06T14:10:40+03:00 0:00.000 0.000u 6.9.10 Configure convert[5457]: utility.c/ExpandFilenames/954/Configure
Command line: /usr/bin/convert {-debug} {all} {file://test.png} {-geometry} {800x500} {sixel:-}
2022-01-06T14:10:40+03:00 0:00.000 0.000u 6.9.10 Policy convert[5457]: policy.c/IsRightsAuthorized/604/Policy
Domain: Module; rights=Read; pattern="PNG" ...
2022-01-06T14:10:40+03:00 0:00.010 0.000u 6.9.10 Configure convert[5457]: configure.c/GetConfigureOptions/685/Configure
Searching for configure file: "/usr/share/ImageMagick-6/coder.xml"
2022-01-06T14:10:40+03:00 0:00.010 0.000u 6.9.10 Configure convert[5457]: configure.c/GetConfigureOptions/685/Configure
Searching for configure file: "/usr/lib/x86_64-linux-gnu/ImageMagick-6.9.10//config-Q16/coder.xml"
2022-01-06T14:10:40+03:00 0:00.010 0.000u 6.9.10 Configure convert[5457]: configure.c/GetConfigureOptions/685/Configure
Searching for configure file: "/etc/ImageMagick-6/coder.xml"
2022-01-06T14:10:40+03:00 0:00.010 0.000u 6.9.10 Configure convert[5457]: configure.c/GetConfigureOptions/685/Configure
Searching for configure file: "/usr/share/doc/imagemagick-6-common/htmlcoder.xml"
2022-01-06T14:10:40+03:00 0:00.010 0.000u 6.9.10 Configure convert[5457]: configure.c/GetConfigureOptions/685/Configure
Searching for configure file: "/home/****/.config/ImageMagick/coder.xml"
2022-01-06T14:10:40+03:00 0:00.010 0.000u 6.9.10 Configure convert[5457]: configure.c/GetConfigureOptions/685/Configure
Searching for configure file: "/home/****/.magick/coder.xml"
2022-01-06T14:10:40+03:00 0:00.010 0.000u 6.9.10 Configure convert[5457]: coder.c/LoadCoderCache/818/Configure
Loading coder configuration file "/etc/ImageMagick-6/coder.xml" ...
2022-01-06T14:10:40+03:00 0:00.010 0.000u 6.9.10 Module convert[5457]: module.c/OpenModule/1300/Module
Searching for module "PNG" using filename "png.la"
2022-01-06T14:10:40+03:00 0:00.010 0.000u 6.9.10 Module convert[5457]: module.c/GetMagickModulePath/546/Module
Searching for coder module file "png.la" ...
2022-01-06T14:10:40+03:00 0:00.010 0.000u 6.9.10 Module convert[5457]: module.c/OpenModule/1309/Module
Opening module at path "/usr/lib/x86_64-linux-gnu/ImageMagick-6.9.10/modules-Q16/coders/png.la"
2022-01-06T14:10:40+03:00 0:00.010 0.010u 6.9.10 Module convert[5457]: module.c/OpenModule/1336/Module
Method "RegisterPNGImage" in module "PNG" at address 0x7ffbb4062b00
2022-01-06T14:10:40+03:00 0:00.010 0.010u 6.9.10 Module convert[5457]: module.c/OpenModule/1350/Module
Method "UnregisterPNGImage" in module "PNG" at address 0x7ffbb40630c0
2022-01-06T14:10:40+03:00 0:00.010 0.010u 6.9.10 Policy convert[5457]: policy.c/IsRightsAuthorized/604/Policy
Domain: Module; rights=Read; pattern="FiLE" ...
2022-01-06T14:10:40+03:00 0:00.010 0.010u 6.9.10 Module convert[5457]: module.c/OpenModule/1300/Module
Searching for module "FiLE" using filename "file.la"
2022-01-06T14:10:40+03:00 0:00.010 0.010u 6.9.10 Module convert[5457]: module.c/GetMagickModulePath/546/Module
Searching for coder module file "file.la" ...
2022-01-06T14:10:40+03:00 0:00.030 0.010u 6.9.10 Configure convert[5457]: configure.c/GetConfigureOptions/685/Configure
Searching for configure file: "/usr/share/ImageMagick-6/delegates.xml"
2022-01-06T14:10:40+03:00 0:00.030 0.010u 6.9.10 Configure convert[5457]: configure.c/GetConfigureOptions/685/Configure
Searching for configure file: "/usr/lib/x86_64-linux-gnu/ImageMagick-6.9.10//config-Q16/delegates.xml"
2022-01-06T14:10:40+03:00 0:00.030 0.010u 6.9.10 Configure convert[5457]: configure.c/GetConfigureOptions/685/Configure
Searching for configure file: "/etc/ImageMagick-6/delegates.xml"
2022-01-06T14:10:40+03:00 0:00.030 0.010u 6.9.10 Configure convert[5457]: configure.c/GetConfigureOptions/685/Configure
Searching for configure file: "/usr/share/doc/imagemagick-6-common/htmldelegates.xml"
2022-01-06T14:10:40+03:00 0:00.030 0.010u 6.9.10 Configure convert[5457]: configure.c/GetConfigureOptions/685/Configure
Searching for configure file: "/home/****/.config/ImageMagick/delegates.xml"
2022-01-06T14:10:40+03:00 0:00.030 0.010u 6.9.10 Configure convert[5457]: configure.c/GetConfigureOptions/685/Configure
Searching for configure file: "/home/****/.magick/delegates.xml"
2022-01-06T14:10:40+03:00 0:00.030 0.010u 6.9.10 Configure convert[5457]: delegate.c/LoadDelegateCache/2096/Configure
Loading delegate configuration file "/etc/ImageMagick-6/delegates.xml" ...
2022-01-06T14:10:40+03:00 0:00.030 0.010u 6.9.10 Policy convert[5457]: policy.c/IsRightsAuthorized/604/Policy
Domain: Path; rights=Read; pattern="file://test.png" ...
2022-01-06T14:10:40+03:00 0:00.030 0.010u 6.9.10 Locale convert[5457]: locale.c/GetLocaleOptions/856/Locale
Searching for locale file: "/usr/share/ImageMagick-6/locale.xml"
2022-01-06T14:10:40+03:00 0:00.040 0.010u 6.9.10 Locale convert[5457]: locale.c/GetLocaleOptions/856/Locale
Searching for locale file: "/usr/lib/x86_64-linux-gnu/ImageMagick-6.9.10//config-Q16/locale.xml"
2022-01-06T14:10:40+03:00 0:00.040 0.010u 6.9.10 Locale convert[5457]: locale.c/GetLocaleOptions/856/Locale
Searching for locale file: "/etc/ImageMagick-6/locale.xml"
2022-01-06T14:10:40+03:00 0:00.040 0.010u 6.9.10 Locale convert[5457]: locale.c/GetLocaleOptions/856/Locale
Searching for locale file: "/usr/share/doc/imagemagick-6-common/htmllocale.xml"
2022-01-06T14:10:40+03:00 0:00.040 0.010u 6.9.10 Locale convert[5457]: locale.c/GetLocaleOptions/856/Locale
Searching for locale file: "/home/****/.config/ImageMagick/locale.xml"
2022-01-06T14:10:40+03:00 0:00.040 0.010u 6.9.10 Locale convert[5457]: locale.c/GetLocaleOptions/856/Locale
Searching for locale file: "/home/****/.magick/locale.xml"
2022-01-06T14:10:40+03:00 0:00.040 0.010u 6.9.10 Configure convert[5457]: locale.c/LoadLocaleCache/1209/Configure
Loading locale configure file "/usr/share/ImageMagick-6/locale.xml" ...
2022-01-06T14:10:40+03:00 0:00.050 0.010u 6.9.10 Locale convert[5457]: locale.c/GetLocaleOptions/856/Locale
Searching for locale file: "/usr/share/ImageMagick-6/english.xml"
2022-01-06T14:10:40+03:00 0:00.090 0.010u 6.9.10 Locale convert[5457]: locale.c/GetLocaleOptions/856/Locale
Searching for locale file: "/usr/lib/x86_64-linux-gnu/ImageMagick-6.9.10//config-Q16/english.xml"
2022-01-06T14:10:40+03:00 0:00.090 0.010u 6.9.10 Locale convert[5457]: locale.c/GetLocaleOptions/856/Locale
Searching for locale file: "/etc/ImageMagick-6/english.xml"
2022-01-06T14:10:40+03:00 0:00.090 0.010u 6.9.10 Locale convert[5457]: locale.c/GetLocaleOptions/856/Locale
Searching for locale file: "/usr/share/doc/imagemagick-6-common/htmlenglish.xml"
2022-01-06T14:10:40+03:00 0:00.090 0.010u 6.9.10 Locale convert[5457]: locale.c/GetLocaleOptions/856/Locale
Searching for locale file: "/home/****/.config/ImageMagick/english.xml"
2022-01-06T14:10:40+03:00 0:00.090 0.010u 6.9.10 Locale convert[5457]: locale.c/GetLocaleOptions/856/Locale
Searching for locale file: "/home/****/.magick/english.xml"
2022-01-06T14:10:40+03:00 0:00.090 0.010u 6.9.10 Configure convert[5457]: locale.c/LoadLocaleCache/1209/Configure
Loading locale configure file "/usr/share/ImageMagick-6/english.xml" ...
2022-01-06T14:10:40+03:00 0:00.090 0.020u 6.9.10 Exception convert[5457]: blob.c/OpenBlob/2874/Exception
unable to open image `file://test.png': No such file or directory
2022-01-06T14:10:40+03:00 0:00.090 0.020u 6.9.10 Cache convert[5457]: cache.c/DestroyPixelCache/1182/Cache
destroy
2022-01-06T14:10:40+03:00 0:00.090 0.020u 6.9.10 Policy convert[5457]: policy.c/IsRightsAuthorized/604/Policy
Domain: Path; rights=Read; pattern="file://test.png" ...
2022-01-06T14:10:40+03:00 0:00.090 0.020u 6.9.10 Exception convert[5457]: blob.c/OpenBlob/2874/Exception
unable to open image `file://test.png': No such file or directory
2022-01-06T14:10:40+03:00 0:00.090 0.020u 6.9.10 Cache convert[5457]: cache.c/DestroyPixelCache/1182/Cache
destroy
2022-01-06T14:10:40+03:00 0:00.110 0.020u 6.9.10 Exception convert[5457]: convert.c/ConvertImageCommand/3258/Exception
no images defined `sixel:-'
convert: unable to open image `file://test.png': No such file or directory @ error/blob.c/OpenBlob/2874.
convert: no images defined `sixel:-' @ error/convert.c/ConvertImageComma
from lsix.
FYI /usr/bin/convert file://
pwd/test.png -geometry 800x500 sixel:-
also is not working.
Output of /usr/bin/convert -debug all test.png -geometry 800x500 sixel:-
:
debug-convert.txt
from lsix.
Same for me, /usr/bin/convert file://foo.jpg -geometry 800x500 sixel:- is not working, without the "file://" protocol
it works fine.
So, if I remove the "file://" prefix in lsix, i.e. so line 243 reads like
onerow[len++]="$1"
everything is fine, I can see all image thumbnails, even when using path names in the command.
Is there any disadvantage or security implication to omit the "file://" protocol?
Otherwise I would suggest to just omit it.
from lsix.
Thank you. It is not a security issue. If I recall correctly, it was a workaround for the way ImageMagick treats files that have a colon in them. I can turn that into an "if/then", but am reluctant to complicate the code if the problem is actually in Ubuntu.
Just to double check: you are using Ubuntu 20? What version of ImageMagick is installed?
from lsix.
Oh, sorry, I seem to have hijacked this thread. No, not Ubuntu. I read this thread and figured it matched
my findings. I'm on openSUSE 15.3, ImageMagick 7.0.7-34 with some default SUSE hardening.
In my policy.xml, there is
<policy domain="coder" rights="none" pattern="URL" />
without this line (or changing to rights="read|write"), "file://" works.
from lsix.
Related Issues (20)
- transparent background? HOT 4
- Support for Alacritty HOT 4
- Terminal not supported - Siduck76's st (sixel branch) HOT 4
- KDE's konsole fully supports sixel and `lsix` starting with version 22.04 HOT 1
- ERROR: montage: delegate library support not built-in HOT 2
- Your terminal does not report having sixel graphics support HOT 3
- Neovim Terminal with hologram.nvim
- Regression from #55: Alacritty-sixel error "mention attribute codes: ^[[?6c" HOT 8
- paging support HOT 1
- gnome-terminal + vte with sixel support, but lsix not working HOT 2
- Check for other animated formats HOT 7
- lsix error: montage.exe: unable to open image
- lsix doesn't work on Wezterm + Windows + Git Bash shell
- Real text under thumbnails HOT 3
- Installed a fresh lsix on macOS with homebrew, got a IMv7 warning HOT 5
- Non-sixel terminals HOT 1
- Seeing `+`s instead of an image HOT 4
- WARNING: The convert command is deprecated in IMv7, use "magick" HOT 8
- Fails to detect sixel support under kitty HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lsix.