delegate failed for BPG
-
- Posts: 12
- Joined: 2018-11-07T18:19:39-07:00
- Authentication code: 1152
delegate failed for BPG
I try to use BPG on ImageMagick (Windows 64 ImageMagick-7.0.8-28-Q16-x64-dll.exe)
I install bpg first
I download bpg-0.9.8-win64.zip from BPG website and extract it and add to the system path. I assure I can do bpgenc on command line.
Then I install ImageMagick.
I then try command
magick tmp_0.png tmp_0.bpg
But it gives following error msg.
magick.exe: FailedToExecuteCommand `"bpgenc" -b 12 -q 4 -o "C:/Users/ADMINI~1/AppData/Local/Temp/magick-2932Mcjf2C_qT_L7" "C:/Users/ADMINI~1/AppData/Local/Temp/magick-2932v1-3ZlFNANVg"' (-1073741819) @ error/delegate.c/ExternalDelegateCommand/478.
magick.exe: delegate failed `"bpgenc" -b 12 -q %~ -o "%o" "%i"' @ error/delegate.c/InvokeDelegate/1867.
I install bpg first
I download bpg-0.9.8-win64.zip from BPG website and extract it and add to the system path. I assure I can do bpgenc on command line.
Then I install ImageMagick.
I then try command
magick tmp_0.png tmp_0.bpg
But it gives following error msg.
magick.exe: FailedToExecuteCommand `"bpgenc" -b 12 -q 4 -o "C:/Users/ADMINI~1/AppData/Local/Temp/magick-2932Mcjf2C_qT_L7" "C:/Users/ADMINI~1/AppData/Local/Temp/magick-2932v1-3ZlFNANVg"' (-1073741819) @ error/delegate.c/ExternalDelegateCommand/478.
magick.exe: delegate failed `"bpgenc" -b 12 -q %~ -o "%o" "%i"' @ error/delegate.c/InvokeDelegate/1867.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: delegate failed for BPG
On my Mac, IM 7.0.8.27, I can do
and it works fine without installing anything.
Code: Select all
magick logo: logo.bpg
-
- Posts: 12
- Joined: 2018-11-07T18:19:39-07:00
- Authentication code: 1152
Re: delegate failed for BPG
Actually, I have a 7.0.8.27 installed and it works fine.
Could you help me reproducing this error because I dont want to lose the 27 version installation on the other PC? I do not have 27 version installer either.
Could you help me reproducing this error because I dont want to lose the 27 version installation on the other PC? I do not have 27 version installer either.
Last edited by dem123456789 on 2019-02-22T10:27:04-07:00, edited 1 time in total.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: delegate failed for BPG
I am installing 7.0.8.28 and will try shortly.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: delegate failed for BPG
It works fine for me on Mac OSX Sierra with IM 7.0.8.28 Q16
-
- Posts: 12
- Joined: 2018-11-07T18:19:39-07:00
- Authentication code: 1152
Re: delegate failed for BPG
Is my installation process correct?
I cannot interpret the error msg.
I cannot interpret the error msg.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: delegate failed for BPG
Sorry, I do not know Windows. But perhaps it is getting confused by your external install of the bpg program.
-
- Posts: 12
- Joined: 2018-11-07T18:19:39-07:00
- Authentication code: 1152
Re: delegate failed for BPG
Normally, how does IM detect if I instal bpg or not?
The bpg program is just binary files extracted from zip. If I do not add them to the system path, I dont think IM will know I install them.
The bpg program is just binary files extracted from zip. If I do not add them to the system path, I dont think IM will know I install them.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: delegate failed for BPG
I do not know the answer to that question. But I am on a Mac and did not install those packages. So I assume ImageMagick install comes with that code already integrated.
-
- Posts: 12
- Joined: 2018-11-07T18:19:39-07:00
- Authentication code: 1152
Re: delegate failed for BPG
I find the problem is that the PNG image I try to encode with BPG cannot be encoded with 12 bit-depth.
I use bpgenc tmp.png. It works, but if I use bpgenc -b 12 tmp.png, it raise Segmentation Fault.
The delegate file acutually default BPG bit-depth to 12 and cannot be changed with -depth argument.
However bpgenc can work with bit-depth ranging from 8 to 12.
I change
<delegate decode="png" encode="bpg" command=""bpgenc" -b 12 -q %~ -o "%o" "%i""/> in delegate.xml
to
<delegate decode="png" encode="bpg" command=""bpgenc" -b 8 -q %~ -o "%o" "%i""/> and it then works fine.
I dont know howI can upload the image I use here. I use public data SVHN (32x32 RGB image).
I use bpgenc tmp.png. It works, but if I use bpgenc -b 12 tmp.png, it raise Segmentation Fault.
The delegate file acutually default BPG bit-depth to 12 and cannot be changed with -depth argument.
However bpgenc can work with bit-depth ranging from 8 to 12.
I change
<delegate decode="png" encode="bpg" command=""bpgenc" -b 12 -q %~ -o "%o" "%i""/> in delegate.xml
to
<delegate decode="png" encode="bpg" command=""bpgenc" -b 8 -q %~ -o "%o" "%i""/> and it then works fine.
I dont know howI can upload the image I use here. I use public data SVHN (32x32 RGB image).
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: delegate failed for BPG
This forum does not support direct image upload. So post your image to some free hosting service (zip it if necessary) to keep it from being changed by the upload. Then put the URL here.
-
- Posts: 12
- Joined: 2018-11-07T18:19:39-07:00
- Authentication code: 1152
Re: delegate failed for BPG
I upload the image to a free hosting website.
https://ibb.co/BwxFQZ4
I think you can use bpgenc -b 12 tmp.png to reproduce the error
or use magick tmp.png tmp.bpg
If you change the line at delegate.xml from -b 12 to -b 8 or just use bpgenc tmp.png (default bit depth for bpgenc is 8. It will work.
https://ibb.co/BwxFQZ4
I think you can use bpgenc -b 12 tmp.png to reproduce the error
or use magick tmp.png tmp.bpg
If you change the line at delegate.xml from -b 12 to -b 8 or just use bpgenc tmp.png (default bit depth for bpgenc is 8. It will work.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: delegate failed for BPG
This is an issue for the IM developers. Post your issue in the Developers forum or the Bugs forum. Put your exact command, IM version and platform and your issue with using -depth. I am confused whether the problem is with 8 or 12. But if bpgenc does not work with one of them, I suspect ImageMagick cannot either. Put a link back to this topic for reference.
-
- Posts: 12
- Joined: 2018-11-07T18:19:39-07:00
- Authentication code: 1152
Re: delegate failed for BPG
ImageMagick cannot do that either. But I think the best practice may to default to use 8 bit depth like BPG does and also enable the user to change the bit depth from 8 to maybe 12 using -depth argument.
-
- Posts: 12
- Joined: 2018-11-07T18:19:39-07:00
- Authentication code: 1152
Re: delegate failed for BPG
I open a GitHub issue here https://github.com/ImageMagick/ImageMagick/issues/1489