Skip to content

Commit

Permalink
Merge pull request #105 from robinmordasiewicz/screenshots-31
Browse files Browse the repository at this point in the history
fix: adding drop shadows
  • Loading branch information
robinmordasiewicz authored Nov 26, 2023
2 parents e006ee8 + 4448d75 commit 59467c3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/screenshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:
mv arrow-bevel.png $entry
done
- name: create-border
- name: create-border-shadow
run: |
for entry in 315-arrow.png 225-arrow.png
do
Expand All @@ -128,12 +128,14 @@ jobs:
\( mpr:alpha -morphology dilate disk:1 \) \
-alpha off -compose copy_opacity -composite \
$entry
convert $entry \( +clone -background black -shadow 50x10+10+10 \) +swap -background none -layers merge +repage output.png
mv output.png $entry
done
rm arrow-white-border.png
- name: overlay-arrow
run: |
composite -geometry +810+55 315-arrow.png github-fork-border.png github-fork-border-arrow.png
composite -geometry +915+140 315-arrow.png github-fork-border.png github-fork-border-arrow.png
composite -geometry +525+160 225-arrow.png github-profile-border.png github-profile-border-arrow.png
- name: make-drop-shadow
Expand Down
31 changes: 16 additions & 15 deletions tmp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,20 @@ convert -size 486x96 \
-draw "polygon 482,47 385,4 400,36 10,36 10,58 400,58 385,92" \
arrow.png

width=8
convert -rotate 315 -background 'rgba(0,0,0,0)' arrow.png 315-arrow.png
convert -rotate 225 -background 'rgba(0,0,0,0)' arrow.png 225-arrow.png
mv 315-arrow.png arrow.png

convert -size 486x96 \
xc:black \
-fill white \
-draw "ellipse 14,47 11,11 0,360" \
-draw "polygon 482,47 385,4 400,36 10,36 10,58 400,58 385,92" \
mask.png

width=10
wfact=$((1000 * width))
depth=80
depth=40
icontr=$(convert xc: -format "%[fx:(0.5*$depth-100)]" info:)

convert arrow.png -bordercolor none -border 10x10 -write mpr:img \
Expand Down Expand Up @@ -45,19 +56,9 @@ convert arrow-white-border.png \
-alpha off -compose copy_opacity -composite \
arrow-white-black-border.png

open arrow-white-black-border.png

convert "arrow.png" \
\( "arrow.png" -alpha extract \) \
-matte -bordercolor none -border 100x100 \
-alpha off -compose copy_opacity -composite -compose over \
\( -clone 0 -background black -shadow 25x4+3+4 \) \
+swap \
-background none -layers merge \
-trim \
"output.png"

open output.png
convert arrow-white-black-border.png \( +clone -background black -shadow 50x10+10+10 \) +swap -background none -layers merge +repage output.png
composite -geometry +915+140 output.png docs/img/github-fork.png output2.png
open output2.png

#convert -rotate 315 -background 'rgba(0,0,0,0)' arrow.png rotated_arrow.png
#composite -geometry +990+100 rotated_arrow.png docs/img/github-fork.png output.png
Expand Down

0 comments on commit 59467c3

Please sign in to comment.