-
-
Notifications
You must be signed in to change notification settings - Fork 0
Further Processing
exochron edited this page Feb 13, 2024
·
3 revisions
So after generating some nice screenshots you would like to edit and upload them to your project page. The bad news is that there is no official Api on CurseForge or Wago for image handling yet.
But at least you can edit your image files from the command line. In this example we are using the crop feature of Imagick.
In Powershell:
cd C:\...\World of Warcraft\_retail_\Interface\AddOns\MyAddon
# move most recent screenshot into ./Images with specific name
$files = ("01_front.jpg", '02_screen.jpg', '03_options.jpg')
gci ..\..\..\Screenshots\ | sort LastWriteTime |select -last $files.Count | ForEach-Object -Begin{ $i=0 } -Process { $f=$files[$i++]; move ..\..\..\Screenshots\$_ .\Images\$f -Force }
# using imagick mogrify to crop images
magick mogrify -crop 960x817+10+113 01_front.jpg
magick mogrify -crop 880x800+10+130 02_screen.jpg
magick mogrify -crop 1225x800+10+130 03_options.jpg
In Linux Bash:
#!/bin/bash
# use project folder as working directory
cd "/.../World of Warcraft/_retail_/Interface/AddOns/MyAddon"
# switch into Images sub folder
cd Images || return
# move most recent screenshot into ./Images with specific name
mv "$(ls -dtr1 ../../../../Screenshots/* | tail -1)" 03_options.jpg
mv "$(ls -dtr1 ../../../../Screenshots/* | tail -1)" 02_screen.jpg
mv "$(ls -dtr1 ../../../../Screenshots/* | tail -1)" 01_front.jpg
# using imagick mogrify to crop images
magick mogrify -crop 960x817+10+113 01_front.jpg
magick mogrify -crop 880x800+10+130 02_screen.jpg
magick mogrify -crop 1225x800+10+130 03_options.jpg