Blimp
A complete wrapper around all imagemagick commands with autocompletion, descriptions and hints displayed in prompt
Install / Use
/learn @walseb/BlimpREADME
[[https://melpa.org/#/blimp][file:https://melpa.org/packages/blimp-badge.svg]]
- Blimp - Bustling Image Manipulation Package Blimp is a complete wrapper around all imagemagick commands with descriptions, autocompletion (for some commands) and hints displayed in prompt using eimp.el to execute its commands and resize images.
#+html: <img src="screenshot.png" alt="Blimp command building"/>
** Features
- Should support all documented imagemagick commands (as of Aug 2018)
- Supports all completion frontends (ivy, helm, ido, etc)
- Writes changes to buffer instead of file allowing you to revert changes before saving
- Undo and redo image changes with =(setq eimp-enable-undo t)=
- Parameter autocomplete for some commands
- Description of command and input format in prompt
- Resize images to fit window or manually using the mouse
** Install #+BEGIN_SRC emacs-lisp (require 'blimp) (add-hook 'image-mode-hook 'blimp-mode) #+END_SRC
** Usage First enter an image-buffer and type =C-c C-o= to bring up the =blimp-interface=. After choosing a imagemagick command and its parameters, type =C-c C-e= to apply the chosen command(s) on the current image or =C-c C-r= to clear all queued commands. You can also do =C-c C-O= to apply the command right after selecting it and =C-c C-p= to toggle the current command prefix between "+" and "-".
If you want to resize the current image to fit the buffer you have several alternatives: =M-x eimp-fit-image-height-to-window= or =M-x eimp-fit-image-to-whole-window= or =M-x eimp-fit-image-to-window= or =M-x eimp-fit-image-width-to-window=
** Configuration If you want to skip using =blimp-interface= and instead have hotkeys for specific commands you can do #+BEGIN_SRC emacs-lisp ;; Prompts for amount of degrees to rotate then applies the rotation (defun my/blimp-rotate() (interactive) (blimp-interface-execute "rotate"))
(define-key eimp-mode (kbd "C-c C-R") 'my/blimp-rotate) #+END_SRC
Or if you want to run commands with all their paramaters already set #+BEGIN_SRC emacs-lisp ;; Rotates image 90 degrees when called (defun my/blimp-rotate-90() (interactive) (blimp-add-to-command-stack (list "-rotate" "90")) (blimp-execute-command-stack))
(define-key eimp-mode (kbd "C-c C-R") 'my/blimp-rotate-90) #+END_SRC
To resize images using the mouse you can do #+BEGIN_SRC emacs-lisp (define-key blimp-mode-map (kbd "<down-mouse-3>") 'eimp-mouse-resize-image-preserve-aspect) (define-key blimp-mode-map (kbd "<down-mouse-2>") 'eimp-mouse-resize-image) #+END_SRC
*** Macros When using the above commands in macros to quickly modify a lot of images, keep in mind that eimp.el (and by extension =blimp-execute-command-stack=) is async, so you need to wait for the command stack to execute before switching image. To do this i just add =(sleep-for 0.2)= at the end of the script, e.g. at the end of =my/blimp-rotate-90=. More complex commands might require more time to execute so keep this in mind.
Related Skills
node-connect
342.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
85.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
342.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
342.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
