Convert animated WebP to WebM movie with Python
In my last post I mentioned converting an animated WebP image format into a WebM movie format. This post expands on how I did it.
learnings
In my last post I mentioned converting an animated WebP image format into a WebM movie format. This post expands on how I did it.
Happy new year!
Ever needed to extract images from PDFs and found both on-line and off-line tools lacking? Well, I certainly have, and here I present my Python code to extract JPGs/PNGs from PDFs, using PyMuPDF.
I sometimes test randomly downloaded code on macOS in a Sandbox that has limited and network access. I posted about this way back in Jan 2017, Creating a macOS Sandbox to run Kodi, and this is a short refresher for me...
I recently wanted to create an animated PNG, but macOS does not include any built in tools to combine multiple PNGs into an APNG file. Here’s an option using Python source code.
When I export photos or videos from Photos.app, I want the file’s Created Date (Created Date in Finder) to be the time the photo or video was taken. Alas, this is not the way Photos works, and setting the date turned out to be more challenging than expected.
A short one today: here is a function to “delete” (read: move) a file to the macOS Trash (Bin), as a safer alternative to rm
.
Epic Diffusion recently came to my attention, a high-quality merge of various models by John Slegers: “Epîc Diffusion is a general purpose model based on Stable Diffusion 1.x intended to replace the official SD releases as your default model. It is focused on providing high quality output in a wide range of different styles...” Figured I’d give it a spin.
I recently tried Lite XL v2.1.0, a forked and updated version of the original rxi/lite
, “A lightweight text editor written in Lua”, on MacOS ARM. Here are some findings.
iOS 16 introduced new lock screen widgets! Rather that installing various third party widdgets, I want to create my own using Scriptable. Here is a simple “universal” widget to launch an application or a Shortcut (bonus: or even the home screen too!)
I refactored my previous Stable Diffusion code, to clean up, OO it a little, and add new features like tiling, upscaling, PNG metadata. As I mentioned before, I don’t understand AI/ML... but I do understand programming! So here is my new, more elegant Simple-SD v1.0 Python script.
I have more ideas for Stable Diffusion. My nights and weekends are consumed! This time: For inpainting, why create a mask image manually, when A.I. can automatically build a mask from a text prompt? Someone much smarter has already published a paper (arXiv:2112.10003 [cs.CV]), with source code, to do just this!
More Stable Diffusion! This time attempting to add inpainting / masking based on my previous code, to merge both txt2img.py
and img2img.py
capabilities, disregarding the out-of-box inpainting.py
code, which does not have parameters for positive or negative prompts. Keyword being attempting...
I’ve been playing around with the Stable Diffusion scripts a little (to be exact, Ben Firshman’s version). To help me understand the script, I decided to re-write it the way I prefer to use it... either breaking or optimizing it in the process :P
Here is a macOS Automator script to watermark a PDF, and also set metadata like author and title. Followed by a more advanced script to do all that an also set an owner password and access permissions... auto-magically.
In my last post, “Re-mapping physical function keys on MacBook Pros” I used the hidutil
tool to re-map the function keys on a Mac without a touchbar. I’ve since created a script to more easily apply changes.
I’ve not posted anything in a long time, so I thought I’d dig up something from a long time ago. Once boring day, many moons ago, I stumbled upon a simple console-based Solitaire game, tty-solitaire by Murilo Pereira.
I was not satisfied with my last macOS Shortcut to convert image format and paste. The simple version forced me to choose between PNG and JPEG, and the complex version was too slow - specifically, the Find All Windows action. So here we go again...
I use JavaScript bookmarklets in Mozilla Firefox to open my email, calendar, chat, etc. in pop-up child windows without a toolbar or menu bar. I do this in order to save screen real-estate, and to prevent me from using those windows for browsing and keep them visible all the time. I’ve been wondering how to have pop-up windows without the address bar....
Happy New Year! A big welcome to 2022! I’ve finally updated the look of my blog with a new theme. Well, not really... you see, I’m not very creative, and so, my theme pretty much remains the same... just more purple.
I’ve been trying out Shortcuts on macOS 12 Monterey! I have written about Shortcuts on iOS/iPadOS in the past, so was keen to migrate my automation scripts from Automator or osascript
to Shortcuts. Here is the first one: A Shortcut plus global hotkey to an application, leveraging AppleScript/JXA.