Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
quasseldroid-landing
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Janne Mareike Koschinski
quasseldroid-landing
Commits
8ce59841
Commit
8ce59841
authored
7 years ago
by
Janne Mareike Koschinski
Browse files
Options
Downloads
Patches
Plain Diff
Add asset generation script
parent
968efb3d
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
assets/images/generate_assets.sh
+33
-0
33 additions, 0 deletions
assets/images/generate_assets.sh
with
33 additions
and
0 deletions
assets/images/generate_assets.sh
0 → 100755
+
33
−
0
View file @
8ce59841
#!/bin/bash
IMAGES
=
"quassel_light quassel_dark solarized_light solarized_dark gruvbox_light gruvbox_dark amoled"
RESOLUTIONS
=
"220 266 335 352 532"
PHONE_RESOLUTIONS
=
"16 220 300 400 520 640 800 1000 1220"
cd
$(
dirname
$(
realpath
-s
$0
))
function
generate_thumb
()
{
convert
$1
.png
-filter
Lanczos
-distort
Resize 16x
$1
@thumb.png
convert
$1
@thumb.png
-filter
Lanczos
-distort
Resize 220x
-quality
50
$1
@thumb.jpg
rm
$1
@thumb.png
}
function
generate_resolution
()
{
convert
$1
.png
-filter
Lanczos
-distort
Resize
$2x
$1
@
$2
.png
}
# Generate Images
for
image
in
$IMAGES
;
do
echo
$image
for
resolution
in
$RESOLUTIONS
;
do
generate_resolution
$image
$resolution
done
generate_thumb
$image
done
# Generate Phone
for
resolution
in
$PHONE_RESOLUTIONS
;
do
generate_resolution
"phone"
$resolution
done
convert phone@16.png
-filter
Lanczos
-distort
Resize 400x phone@thumb.png
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment