Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to convert all images #197

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions src/xmb/convert.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/sh

# MonoChrome SVG to PNG Converter
#
# Will update the given icon from its SVG to its PNG.
#
# Requires Inkscape to be installed.
#
# ./convert.sh THEME ICON
#
# Parameters
# - THEME (optional) Which theme to act on.
# - ICON (optional) Which icon to conver from an SVG to a PNG.
#
# If the parameters are not provided, it will process all images.
#
# Example
#
# ./convert.sh monochrome battery-full
# ./convert.sh flatui DOS
# ./convert.sh

if [ -z "$1" ]; then
for theme in $(find . -type d -not -path . -printf "%f\n"); do
for image in $theme/*.svg; do
./convert.sh $theme "$(basename "$image" .svg)"
done
done
else
inkscape -z -e "../../xmb/$1/png/$2.png" -w 512 -h 512 "$1/$2.svg"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that I also changed the width/height to 512.... Mind trying this out, @kivutar @baxysquare?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comparison is over at #189 (comment)

fi;
20 changes: 0 additions & 20 deletions xmb/convert.sh

This file was deleted.