From 478feafedf1bd2b2bb5925968fd551b364b7f7c2 Mon Sep 17 00:00:00 2001 From: Alex Kent Hajnal Date: Thu, 23 May 2024 08:29:21 -0400 Subject: Make imageconverter services compatible with both ImageMagick and GraphicsMagick This resolves issue #42 Signed-off-by: Alex Kent Hajnal --- konq-plugins/imagerotation/imageconverter.desktop | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/konq-plugins/imagerotation/imageconverter.desktop b/konq-plugins/imagerotation/imageconverter.desktop index 62b0ca7..7aba3e6 100644 --- a/konq-plugins/imagerotation/imageconverter.desktop +++ b/konq-plugins/imagerotation/imageconverter.desktop @@ -12,19 +12,19 @@ TryExec=convert [Desktop Action convToJPEG] Name=JPEG Icon=image-x-generic -Exec=convert %f -set filename:base "%d/%t" '%[filename:base].jpg' +Exec=convert %f "$$( echo -n %f\[0\] | perl -pe 's/%/%%/gs; $$n=$$_; open $$h, "-|", "identify", "-format", "%d/%t", $$n; $$_=<$$h>; close $$h; chomp;' ).jpg" [Desktop Action convToPNG] Name=PNG Icon=image-x-generic -Exec=convert %f -set filename:base "%d/%t" '%[filename:base].png' +Exec=convert %f "$$(echo -n %f\[0\] | perl -pe 's/%/%%/gs; $$n=$$_; open $$h, "-|", "identify", "-format", "%d/%t", $$n; $$_=<$$h>; close $$h; chomp;').png" [Desktop Action convToTIF] Name=TIF Icon=image-x-generic -Exec=convert %f -set filename:base "%d/%t" '%[filename:base].tif' +Exec=convert %f "$$(echo -n %f\[0\] | perl -pe 's/%/%%/gs; $$n=$$_; open $$h, "-|", "identify", "-format", "%d/%t", $$n; $$_=<$$h>; close $$h; chomp;').tif" [Desktop Action convToGIF] Name=GIF Icon=image-x-generic -Exec=convert %f -set filename:base "%d/%t" '%[filename:base].gif' +Exec=convert %f "$$(echo -n %f\[0\] | perl -pe 's/%/%%/gs; $$n=$$_; open $$h, "-|", "identify", "-format", "%d/%t", $$n; $$_=<$$h>; close $$h; chomp;').gif" -- cgit v1.2.1