-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Sorry about that! Here's the patch.
I kind of changed the sequence of imagemagick commands, so it may be a little less fancy than it used to be, but I believe the process has been broken down into more understandable steps. There's a SouthEast somewhere that may need to be a "Centre", but I'm unsure about that. Cheers, jonathan On 08/22/2013 06:59 AM, Ben Finney wrote: > package src:comixcursors > tags 684869 + patch > thanks > > On 19-Aug-2013, Jonathan Protzenko wrote: > >> Please find attached a tentative patch that (I think?) fixes the issue. > > Thank you for working on this. > >> I'm rebuilding the package right now. Should I let you apply the patch or >> is there a procedure I should go through to submit the new version of the >> package myself? (If that's the case, I'd be happy to read any relevant >> guide/howto.) > > I am also one of the upstream developers of the package, so patches are > preferred. > > > On 20-Aug-2013, Jonathan Protzenko wrote: >> And here's yet another patch where the shadows aren't cut off. > > That message didn't have a patch attached, could you reply to this and send > the updated patch? > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlIVtQkACgkQaAzAp091CaBpHwCfTtlQYsTj5WIX6vzyAsZfx1YA Z3QAoI5I32ikPD2xyqXiWAlFawMO2rUP =NlFs -----END PGP SIGNATURE-----
diff -pur8 comixcursors-0.7.2/bin/render-cursor-image comixcursors-0.7.2-patched/bin/render-cursor-image --- comixcursors-0.7.2/bin/render-cursor-image 2013-08-22 08:37:24.000000000 +0200 +++ comixcursors-0.7.2-patched/bin/render-cursor-image 2013-08-22 08:49:54.545615314 +0200 @@ -105,19 +105,17 @@ TMPSIZE=$(echo "$SIZE * $TMPSCALE" | bc) XMOVE=$(echo "$XOFFSET * $TMPSCALE" | bc) YMOVE=$(echo "$YOFFSET * $TMPSCALE" | bc) SCALEBLUR=$(echo "$BLUR * $TMPSCALE" | bc) SCALESIZE=$(echo "$SIZE * $TMPSCALE" | bc) # Scaling the shadow from the cursor image. -SHADOWSIZE=$(echo "$TMPSIZE * $SHADOWSCALE" | bc) -RIGHT=$(echo "$TMPSIZE / $SHADOWSCALE" | bc) -LEFT=$(echo "$TMPSIZE - $RIGHT" | bc) +ISHADOWSIZE=$(echo "$TMPSIZE / $SHADOWSCALE" | bc) if [ "$frame" -lt 1 ]; then echo "processing $NAME..." else echo "processing $NAME frame $frame..." fi # write the hotspot config file @@ -166,35 +164,47 @@ function svg2png { function make_shadow_image { # Make the shadow image from a bare image and a silhouette. local infile="$1" local silhouette_image="$2" local shadow_image="$3" convert \ - -extract ${SHADOWSIZE}x${SHADOWSIZE}+${LEFT}+${LEFT} \ -resize ${TMPSIZE}x${TMPSIZE} \ "$bare_image" "$silhouette_image" - convert -modulate 0 \ - -fill "$SHADOWCOLOR" \ - -colorize 100 \ + mogrify \ + -gravity SouthEast \ + -extent ${ISHADOWSIZE}x${ISHADOWSIZE} \ + -background transparent \ + -resize ${TMPSIZE}x${TMPSIZE} \ + "$silhouette_image" + + convert \ + -alpha extract \ + "$silhouette_image" "$shadow_image" + + mogrify \ + -background "$SHADOWCOLOR" \ + -alpha shape \ + "$shadow_image" + + mogrify \ -channel Alpha \ -fx \'a-$SHADOWTRANS\' \ - "$silhouette_image" "$shadow_image" + "$shadow_image" mogrify -channel Alpha \ -blur ${SCALEBLUR}x${SCALEBLUR} \ -resize 50% \ "$shadow_image" mogrify -roll +${XMOVE}+${YMOVE} \ "$shadow_image" - } # Render the bare cursor image. svg2png "$infile" "$bare_image" $TMPSIZE # Check whether the shadow image is cached. if [ ! -f "$shadow_image" ] ; then # Make the shadow image.