For creating of self framed picture you can find a description in the usage pages of ImageMagick
I had improved the first example bit and put everything in a script "selfframe" so that I can apply it easyly on a picture. You find the script at the bottom.
The script is called with one parameter, the name of the picture. It uses only one convert command which does the following:
- load the picture
- clone it (make a copy in a "layer").This is the underlying frame-picture.
- resize the layer by 30%
- adjust the color with +level
- blur the layer
- add a black border around the image
- clone the original image again, This is the original picture on top of the frame-picture.
- draw a border raound this image
- delete the original image because it is not used anymore.
- center then images above each other and composite them
- save the picture with a prefix sf_ to the filename
You can do some more adjustments to the underlying frame. For example you could convert it to b/w with -modulate 100,0,100 before adding the border or blur it several times.
Here comes the script:
#!/bin/bash # selfframe # creating a self framed picture DEBUG="ON" PICTURE="$1" PDIR=`dirname ${PICTURE}` PNAME=`basename ${PICTURE}` if [ $DEBUG = "ON" ] then echo "Picture=${PICTURE}" echo "PDIR=${PDIR}" echo "PNAME=${PNAME}" fi convert ${PICTURE} \ \( -clone 0 -resize 130% +level 20%x100% \ -blur 0x20 -bordercolor black -border 10x10 \) \ \( -clone 0 -bordercolor black -border 10x10 \) \ -delete 0 -gravity center -composite "$PDIR/sf_${PNAME}"
Thomas Arend aka Byg… has replied to DornenwolfThomas Arend aka Byg… has replied to Dornenwolfconvert ${PICTURE} \
\( -clone 0 +level 20%x100% -blur 0x10 \) \
\( -clone 0 -gravity center -crop 90% -bordercolor grey -border 5x5 \) \
-delete 0 -gravity center -composite -bordercolor black -border 0.5% \
"$PDIR/sf2_${PNAME}"
Sign-in to write a comment.