For example, suppose that I want to preview in ExactImage's edisplay an image generated by ImageMagick's convert:
Code: Select all
$ convert input.png -trim output.png
$ edisplay output.png
Code: Select all
$ convert input.png -trim show:
Code: Select all
$ convert input.png -trim output.png
$ edisplay output.png
Code: Select all
$ convert input.png -trim show:
Code: Select all
<delegate decode="png" encode="show" spawn="True" mode="encode" command="imdisplay "%i"" />
Code: Select all
<!-- delegate decode="png" encode="show" spawn="True" mode="encode" command="imdisplay "%i"" / -->
<delegate decode="png" encode="show" spawn="True" mode="encode" command="edisplay "%i"">
It isn't a hack. IM doesn't contain code to do everything that a user might want, and is designed to delegate work to other software. These delegates might be internal (compiled into IM binaries) or external (called via delegates.xml).nicolai.rostov wrote:At any rate, I guess this hack would work only for PNG files but not generally, that is, not for any other format whatever.
Code: Select all
<delegate decode="png" encode="show" spawn="True" mode="encode" command="edisplay "%i"" />
Code: Select all
<!--delegate decode="miff" encode="show" spawn="True" command=""/usr/bin/display" -delay 0 -window-group %[group] -title "%l " "ephemeral:%i"" /-->
Oops, well spotted. Thanks.nicolai.rostov wrote:...a typo in your code...