Skip to content

Instantly share code, notes, and snippets.

@tazihad
Last active September 30, 2026 03:13
Show Gist options
  • Select an option

  • Save tazihad/ec938c99d9501ec2e9efd007cb08aa19 to your computer and use it in GitHub Desktop.

Select an option

Save tazihad/ec938c99d9501ec2e9efd007cb08aa19 to your computer and use it in GitHub Desktop.
[Desktop Entry]
Type=Service
ServiceTypes=KonqPopupMenu/Plugin
MimeType=image/jpeg;image/png;image/webp;image/avif;image/jxl;image/heif;image/heic;image/tiff;image/bmp;image/gif;image/svg+xml;image/x-tga;image/x-dds;image/x-exr;image/vnd.radiance;image/x-adobe-dng;image/x-canon-cr2;image/x-canon-cr3;image/x-nikon-nef;image/x-sony-arw;
X-KDE-Submenu=ImageMagick Studio
X-KDE-Priority=TopLevel
Actions=WebOptimize;MakeProgressive;MakeFavicons;MakeAnimatedGIF;_SEPARATOR_;Compress80;Compress60;Compress40;_SEPARATOR_;Resize50;Resize25;Resize1920;Resize1080;ResizeSquare;_SEPARATOR_;DropShadow;AddBorder;TransparentToWhite;SepiaTone;Grayscale;_SEPARATOR_;StripAllMetadata;ViewMetadata;AddComment;_SEPARATOR_;Rotate90;FlipH;FlipV;ConvertToAvif;ConvertToJxl;ConvertToWebp;ConvertToPNG;ConvertToJPG;
# ==================== ADVANCED WEB & FX ====================
[Desktop Action WebOptimize]
Name=Optimize for Web (Advanced Compression & Sharpness)
Icon=applications-internet
Exec=bash -c 'for f in "$@"; do magick "$f" -filter Triangle -define filter:support=2 -unsharp 0.25x0.25+8+0.065 -dither None -posterize 136 -quality 82 -define jpeg:fancy-upsampling=off -define png:compression-filter=5 -define png:compression-level=9 -define png:compression-strategy=1 -define png:exclude-chunk=all -colorspace sRGB -strip -interlace Plane "${f%.*}_optimized.${f##*.}"; done' _ %F
[Desktop Action MakeProgressive]
Name=Convert to Progressive (Plane Interlace)
Icon=image-jpeg
Exec=bash -c 'for f in "$@"; do magick "$f" -strip -interlace Plane "${f%.*}_progressive.${f##*.}"; done' _ %F
[Desktop Action DropShadow]
Name=Add Drop Shadow (Transparent PNG)
Icon=draw-shadow
Exec=bash -c 'for f in "$@"; do magick "$f" \( +clone -background black -shadow 80x8+8+8 \) +swap -background none -layers merge +repage "${f%.*}_shadow.png"; done' _ %F
[Desktop Action MakeFavicons]
Name=Generate Favicon & Icon Set (Folder)
Icon=preferences-desktop-icons
Exec=bash -c 'for f in "$@"; do d="${f%.*}_favicons"; mkdir -p "$d"; magick "$f" -resize 16x16 "$d/favicon-16x16.png"; magick "$f" -resize 32x32 "$d/favicon-32x32.png"; magick "$f" -resize 180x180 "$d/apple-touch-icon.png"; magick "$f" -resize 192x192 "$d/android-chrome-192x192.png"; magick "$f" -resize 512x512 "$d/android-chrome-512x512.png"; magick "$f" -define icon:auto-resize=64,48,32,16 "$d/favicon.ico"; done' _ %F
[Desktop Action MakeAnimatedGIF]
Name=Combine Selected Images to Animated GIF (1s Delay)
Icon=image-gif
Exec=bash -c 'magick -delay 100 -loop 0 "$@" "animated_$(date +%%Y%%m%%d_%%H%%M%%S).gif"' _ %F
# ==================== COMPRESS / SIZE REDUCTION ====================
[Desktop Action Compress80]
Name=Compress / Reduce Size (80% Quality)
Icon=file-zoom-out
Exec=bash -c 'for f in "$@"; do magick "$f" -strip -quality 80 "${f%.*}_comp80.${f##*.}"; done' _ %F
[Desktop Action Compress60]
Name=Compress / Reduce Size (60% Quality)
Icon=file-zoom-out
Exec=bash -c 'for f in "$@"; do magick "$f" -strip -quality 60 "${f%.*}_comp60.${f##*.}"; done' _ %F
[Desktop Action Compress40]
Name=Compress / Reduce Size (40% Quality - Max Savings)
Icon=file-zoom-out
Exec=bash -c 'for f in "$@"; do magick "$f" -strip -quality 40 "${f%.*}_comp40.${f##*.}"; done' _ %F
# ==================== RESIZE & SCALE ====================
[Desktop Action Resize50]
Name=Resize to 50% Scale
Icon=transform-scale
Exec=bash -c 'for f in "$@"; do magick "$f" -resize 50%% "${f%.*}_50pct.${f##*.}"; done' _ %F
[Desktop Action Resize25]
Name=Resize to 25% Scale
Icon=transform-scale
Exec=bash -c 'for f in "$@"; do magick "$f" -resize 25%% "${f%.*}_25pct.${f##*.}"; done' _ %F
[Desktop Action Resize1920]
Name=Resize Width to 1920px (Keep Aspect Ratio)
Icon=transform-scale
Exec=bash -c 'for f in "$@"; do magick "$f" -resize 1920x "${f%.*}_1920w.${f##*.}"; done' _ %F
[Desktop Action Resize1080]
Name=Resize Width to 1080px (Keep Aspect Ratio)
Icon=transform-scale
Exec=bash -c 'for f in "$@"; do magick "$f" -resize 1080x "${f%.*}_1080w.${f##*.}"; done' _ %F
[Desktop Action ResizeSquare]
Name=Fit to 800x800 Box (Square Limit)
Icon=transform-scale
Exec=bash -c 'for f in "$@"; do magick "$f" -resize 800x800\> "${f%.*}_800x800.${f##*.}"; done' _ %F
# ==================== EFFECTS & COLOR ====================
[Desktop Action AddBorder]
Name=Add 10px White Border
Icon=borderpaint
Exec=bash -c 'for f in "$@"; do magick "$f" -bordercolor "#FFFFFF" -border 10 "${f%.*}_border.${f##*.}"; done' _ %F
[Desktop Action TransparentToWhite]
Name=Flatten Transparency to White
Icon=draw-eraser
Exec=bash -c 'for f in "$@"; do magick "$f" -background "#FFFFFF" -flatten "${f%.*}_noalpha.jpg"; done' _ %F
[Desktop Action SepiaTone]
Name=Apply Sepia Filter (80%)
Icon=color-management
Exec=bash -c 'for f in "$@"; do magick "$f" -sepia-tone 80%% "${f%.*}_sepia.${f##*.}"; done' _ %F
[Desktop Action Grayscale]
Name=Convert Colorspace to Grayscale
Icon=color-profile
Exec=bash -c 'for f in "$@"; do magick "$f" -colorspace Gray "${f%.*}_gray.${f##*.}"; done' _ %F
# ==================== METADATA MANAGEMENT ====================
[Desktop Action StripAllMetadata]
Name=Strip All Metadata (EXIF/IPTC/XMP)
Icon=edit-delete
Exec=bash -c 'for f in "$@"; do magick "$f" -strip "${f%.*}_pure.${f##*.}"; done' _ %F
[Desktop Action ViewMetadata]
Name=Extract EXIF Metadata to Text File
Icon=document-edit
Exec=bash -c 'for f in "$@"; do magick identify -verbose "$f" > "${f%.*}_metadata.txt"; done' _ %F
[Desktop Action AddComment]
Name=Embed Timestamp & Comment
Icon=document-edit
Exec=bash -c 'for f in "$@"; do magick "$f" -set comment "Processed on $(date)" "${f%.*}_commented.${f##*.}"; done' _ %F
# ==================== TRANSFORM & CONVERT ====================
[Desktop Action Rotate90]
Name=Rotate 90° Clockwise
Icon=object-rotate-right
Exec=bash -c 'for f in "$@"; do magick "$f" -rotate 90 "${f%.*}_rot90.${f##*.}"; done' _ %F
[Desktop Action FlipH]
Name=Flip Horizontally
Icon=object-flip-horizontal
Exec=bash -c 'for f in "$@"; do magick "$f" -flop "${f%.*}_fliph.${f##*.}"; done' _ %F
[Desktop Action FlipV]
Name=Flip Vertically
Icon=object-flip-vertical
Exec=bash -c 'for f in "$@"; do magick "$f" -flip "${f%.*}_flipv.${f##*.}"; done' _ %F
[Desktop Action ConvertToAvif]
Name=Convert to AVIF (q65)
Icon=image-x-generic
Exec=bash -c 'for f in "$@"; do magick "$f" -quality 65 "${f%.*}.avif"; done' _ %F
[Desktop Action ConvertToJxl]
Name=Convert to JPEG XL (q85)
Icon=image-x-generic
Exec=bash -c 'for f in "$@"; do magick "$f" -quality 85 "${f%.*}.jxl"; done' _ %F
[Desktop Action ConvertToWebp]
Name=Convert to WebP (q82)
Icon=image-x-generic
Exec=bash -c 'for f in "$@"; do magick "$f" -quality 82 "${f%.*}.webp"; done' _ %F
[Desktop Action ConvertToPNG]
Name=Convert to PNG
Icon=image-png
Exec=bash -c 'for f in "$@"; do magick "$f" "${f%.*}.png"; done' _ %F
[Desktop Action ConvertToJPG]
Name=Convert to JPEG (q90)
Icon=image-jpeg
Exec=bash -c 'for f in "$@"; do magick "$f" -quality 90 "${f%.*}.jpg"; done' _ %F
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment