Re: [oS-EN] Image magick refuses to convert a true jpg file
Daniel Bauer via openSUSE Users <[email protected]>
| Newsgroups | gmane.linux.suse.general |
|---|---|
| Message-ID | <[email protected]> |
Am 16.06.26 um 12:49 schrieb Carlos E. R.: > On 2026-06-16 12:19, Daniel Bauer via openSUSE Users wrote: >> Am 16.06.26 um 11:48 schrieb Carlos E. R.: >>> On 2026-06-16 11:35, Daniel Bauer via openSUSE Users wrote: >>>> Am 15.06.26 um 21:47 schrieb Carlos E. R.: >>> >>> >>>>> So the permission error is gone, but still getting an error. I hate >>>>> when software changes the syntax. >>>>> >>>> Masaru Nomiya has shown exactly how it’s done: the file to be read >>>> must be specified first. That’s nothing new. Nothing has changed in >>>> the syntax – at least for the functions I use – except that you >>>> should now use `magick` instead of `convert`. It still works with >>>> the old `convert`, though; you’ll just get a warning. Your errors >>>> have nothing to do with that, but (first) with the policy and >>>> (second) with the wrong order of the parameters. >>> >>> >>> The syntax has changed. On 15.6 I had: >>> >>> cer@Laicolasse:~/Photos/Para compartir con...> cat convertir >>> #!/bin/bash >>> convert "$1" -quality 70 -resize 1000x1000 "F_$1" >>> cer@Laicolasse:~/Photos/Para compartir con...> >>> >>> Now it is: >>> >>> magick "$1" -quality 70 -resize 1000x1000 "F_$1" >>> >> Only the command word has changed, but the old one still works. It >> just gives a warning, not an error. >>> >>> And gives permission error. >>> >> Have you checked file and memory sizes in the policy? > > No. It is the default config in openSUSE. It should just work. There is > no mention of JPG in the file, though. > > My photo is just 1.2 megs, a very normal photo. > >> I have inserted very large numbers because I use multi-processor/ >> parallel scripts on very large files. Here's my policy: >> >> https://www.daniel-bauer.com/div/policy.xml.mychanges >> >> rename your policy.xml >> copy mine, rename it to policy.xml and set the correct user/permissions >> try your magick command >> check the differences of your original file and mine and find the >> numbers that suit you. >> >> Every zypper update of ImageMagick overwrites my changes, so keep the >> changed file with another name, so you can again overwrite the >> overwritten file when necessary :-) > > > Buff :-( > > > I copied your changes (with meld), does not work, same error. > > magick: attempt to perform an operation not allowed by the security > policy `IMG_20260615_195853218.jpg' @ error/blob.c/OpenBlob/3416. that is strange! I could imagine: - IMG_20260615_195853218.jpg is in a directory with a symlink - the command uses a relative path that ImageMagick interprets badly - the full path contains something that matches a blocked pattern To test this copy the file in a non-suspicious directory (/home/carlos/), cd to there and write the command (not run the script) If it works it was one of the above reasons. If not, - paste the exact command you are running - paste the output of magick identify -list policy | grep -E 'path|coder|module' - tell me the exact ImageMagick version (magick -version) I'll test here and see if I find out something (no guarantee...). -- Daniel Bauer photographer Basel Málaga Twitter: @Marsfotografo (often explicit nudes) https://www.patreon.com/danielbauer https://www.daniel-bauer.com (nudes)