Closed AgentConDier closed 10 months ago
I thought I was going insane since seemingly no one else was having this issue...
Images downloaded from the internet seem to work, but images created by Tasker's Crop function and ffmpeg don't load at all. I'm able to work with them on Windows, howvever.
Example broken image (assuming github upload doesn't reencode it):
Yup, that one doesn't work for me either.
~ $ magick identify image.png
identify: unable to read image data `image.png' @ error/constitute.c/ReadImage/991.
~ $ md5sum image.png
48f5939bc1200e150101272167f60138 image.png
Displays fine using timg though.
I don't know if it's related, but it's also my trouble. I can't use chafa, which I was able to use until yesterday. I wonder if it's because I've updated the area around ImageMagick with PKG I came here looking for similar trouble information searching
[~/pyprog]$ chafa
CANNOT LINK EXECUTABLE "chafa": library "libOpenEXR-3_2.so" not found: needed by
/data/data/com.termux/files/usr/lib/libMagickWand-7.Q16HDRI.so in namespace (default)
[~/pyprog]$ python3 plottwo.py
Traceback (most recent call last):
File "/data/data/com.termux/files/home/pyprog/plottwo.py", line 3, in <module>
from chafa.loader import Loader
File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/chafa/loader.py", line 64, in <module>
raise ImportError("MagickWand library not found.")
ImportError: MagickWand library not found.
Seems like it was broken during updates. Can you please remind me to trigger rebuild in 8 hours?
@twaik I tried to rebuild it but that didn't solve the issue
@sylirre what about rebuilding imagemagic?
I'm saying exactly about imagemagick
package.
Issue with chafa unreproducible.
Chafa's problems may be unique to I messed around with a lot of things. 😓 If other people don't seem to have a problem, you can ignore them
If you can reproduce the chafa issue again, please log new issue. We will see how to fix this imagemagick issue here.
Chafa's problems may be unique to I messed around with a lot of things. 😓 If other people don't seem to have a problem, you can ignore them
I had some similar issues where a bunch of different programs were complaining about missing libraries a little while ago, it was fixed with pkg upgrade
, since I had never done it since I installed termux, maybe that could help?
Same here:
$ wget https://cdn.mobygames.com/182b4910-aba5-11ed-8bb9-02420a000197.webp
$ magick identify 182b4910-aba5-11ed-8bb9-02420a000197.webp
identify: unable to read image data `182b4910-aba5-11ed-8bb9-02420a000197.webp' @ error/constitute.c/ReadImage/991.
If I use ImageMagick in a proot (eg: Alpine) then it works fine, so that's at least a workaround.
I tried compiling ImageMagick from within termux, and it seems to work perfectly.
I did have an issue with MagicCore/random.c:381 having an implied function, but you can ~remove~ patch that MAGICKCORE_HAVE_GETENTROPY out without too much harm being done (I think).
seems to be fixed in 7.1.1.25?
Confirmed, working for me in 7.1.1.25
in 7.1.1.25 In my environment, it seems that there are things that can be identified and things that cannot be identified
$ magick identify Stest.png
Stest.png PNG 640x360 640x360+0+0 8-bit sRGB 271405B 0.000u 0:00.000
$ magick identify myfig.png
identify: unable to read image data `myfig.png' @ error/constitute.c/ReadImage/991.
What I couldn't identify is a simple test program in my post below
Here's an image of a graph by matplotlib made by python (there is an image in the final post[^1])
https://github.com/termux/termux-packages/issues/18640#issuecomment-1863460919
[^1]: I just confirmed that the image I uploaded to github has changed md5sum
There may be difficulties in using it for verification
original md5sum myfig.png 401bc1b1c5b2f6921e17e60368d8e910
It's somewhat similar to the post that illustrates this issue. https://github.com/termux/termux-packages/issues/18740#issuecomment-1866999224 i wonder Maybe the binary header is foreign as a difference normallyPNG?
Yup, 7.1.1-25 seems good. All my previously broken test cases are working again.
@Suletta-Majo you can zip the image and upload here
Thank you I zipped it
myfig.zip
Perhaps because of the recreate file, the MD5 has changed from the previous one, but the error was the same
usually I don't use ImageMagick directly like this, so I don't have a serious problem. When I tried it, it was an error, so I posted it
这是来自QQ邮箱的假期自动回复邮件。你好,我最近正在休假中,无法亲自回复你的邮件。我将在假期结束后,尽快给你回复。
ok so using unzip myfig.zip && identify -verbose myfig.png
in my termux home dir works fine. it might be a permissions thing. what's the output of ls -l myfig.png
on the version before zipping?
ls -l myfig.png
[288ms][1][~/pyprog]$ ls -l myfig.png
-rw------- 1 u0_a365 20128 Jan 1 23:50 myfig.png
[55ms][~/pyprog]$ ls -l Stest.png
-rw------- 1 u0_a365 271405 Aug 28 07:10 Stest.png
[33ms][~/pyprog]$ magick identify myfig.png
identify: unable to read image data `myfig.png' @ error/constitute.c/ReadImage/991.
If it is possible to identify someone other than myself, it meanings I think it is just that my environment is broken :/
Thank you very much for verifying it
I didn't back up my system properly, so I'm going to rebuild my environment from reinstalling termux It's not that difficult because just python and modules :)
P.S
after rebuilding a relatively clean termux environment
I was able to display myfig.png information
~ $ magick identify myfig.png
myfig.png PNG 640x480 640x480+0+0 8-bit sRGB 20128B 0.000u 0:00.000
Ok then I will go ahead and close the issue since everyone agree magick
is working now
Problem description
For some image files, magick will fail to open them:
One image that does work are the PNGs generated by
adb shell screencap
:What steps will reproduce the bug?
What is the expected behavior?
ImageMagick is able to read and process the image
System information
termux-info: