Skip to content

Instantly share code, notes, and snippets.

@krantikal
Created April 4, 2021 18:22
Show Gist options
  • Save krantikal/00a4d7a0d4a053ed6fd767cc6de9eecf to your computer and use it in GitHub Desktop.
Save krantikal/00a4d7a0d4a053ed6fd767cc6de9eecf to your computer and use it in GitHub Desktop.
[Image Manipulation] #photo #pix #image
@echo off
:: make gif transparent ...
:: cleangif img.gif ...
:: produces img_clear.gif ...
:: uses im convert ...
:: Shiva, Feb 12, 2018 ...
magick convert %1.gif -fuzz 10% -transparent white %1_clear.gif
@echo off
:: uses nircmd to save an image to gif from command line ...
:: usage: clip2gif imgfname ...
:: Shiva, Dec 12, 2019 ...
:: See also cleangif ...
nircmd clipboard saveimage %1.gif
@echo off
:: uses nircmd to save an image to jpg from command line ...
:: usage: clip2jpg imgfname ...
:: Shiva, Dec 12, 2019 ...
magick convert clipboard: %1.jpg
@echo off
:: uses nircmd to save an image to png from command line ...
:: usage: clip2png imgfname ...
:: Shiva, Dec 12, 2019 ...
magick convert clipboard: %1.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment