If you have a Mac and you end up with an annoying .heic or .webp file, there is already a quick way to convert it, in place, to .jpg:

Here is how to get the same behavior on Windows. First, install ImageMagick, which is free and open source. It will automatically add itself to your path, which we need, since we are using its command line interface.

Then create a batch file with this code:


@echo off

set "input_file=%~1"
set "output_file=%~dpn1.jpg"

echo Input file: "%input_file%"
echo Output file: "%output_file%"

magick convert "%input_file%" "%output_file%"

if exist "%output_file%" (
echo Conversion successful.
) else (
echo Conversion failed.
)

Very simple. Then this other batch file below, which you will need to run as administrator, will add a Convert to JPEG item to your context menu. (Remember on Windows nowadays that you need to shift-right click to get the full context menu.) This version takes as an argument the full path of the above batch file, which you can put wherever you want.


@echo off

set "script_path=%~1"

if not exist "%script_path%" (
echo The specified script does not exist: "%script_path%"
pause
exit /b 1
)

echo Adding context menu for .webp files...
reg add "HKEY_CLASSES_ROOT\SystemFileAssociations\.webp\shell\ConvertToJPEG" /f
reg add "HKEY_CLASSES_ROOT\SystemFileAssociations\.webp\shell\ConvertToJPEG\command" /ve /t REG_EXPAND_SZ /d "\"%script_path%\" \"%%1\"" /f

echo Adding context menu for .heic files...
reg add "HKEY_CLASSES_ROOT\SystemFileAssociations\.heic\shell\ConvertToJPEG" /f
reg add "HKEY_CLASSES_ROOT\SystemFileAssociations\.heic\shell\ConvertToJPEG\command" /ve /t REG_EXPAND_SZ /d "\"%script_path%\" \"%%1\"" /f

echo Context menu integration complete.
pause

Now, you should see this:

And that’s it. Thank you Claude.AI for help with Windows registry nonsense.

April 5, 2024 Posts

John’s Assortment of Beatles Cover Versions, Part One

With all the attention to Beyoncé’s quite good (and Paul-approved) cover of Blackbird,” I thought I’d gather up some of my favorite Beatles cover versions.

There are so many.There are so many.

I had to split this into multiple posts because otherwise loading so many YouTube previews at once would crash some browsers.

Continue to Part 2

April 4, 2024 Posts

meatballmeatball

April 2, 2024 Pics

sleep standardssleep standards

April 2, 2024 Pics

My mind frequently turns to Tom Stoppard’s portable bookcase.My mind frequently turns to Tom Stoppard’s portable bookcase.

April 2, 2024 Pics

I also used to have this bike.I also used to have this bike.

April 2, 2024 Pics