Latest discussions
Hintergrund ändern bei Makro Aufnahmen (Photoshop)
Updated 6 months ago
2 replies
Links zu Tutorials etc. / Links for tutorials
Updated 10 months ago
1 reply
PDF-Präsentatio n in Photoshop
Updated 10 months ago
Self frame
Kalender with ImageMagick
Updated 11 months ago
1 reply
GIF-Animation mit ImageMagick
Updated 11 months ago
Veränderung mit Photoshop Elements
Updated 11 months ago
6 replies
Rahmen
Updated 11 months ago
1 reply
macrostudio im Eimer
Updated 12 months ago
4 replies
"Available Light" Portrait
Updated 12 months ago
1 reply
... view all the discussions

Self frame

posted by Byggvir of Barley
Posted on Thursday January 1st, 2009 at 11:30. 45 visits. ( permalink )

For creating of self framed picture you can find a description in the usage pages of ImageMagick


look here





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:


  1. load the picture
  2. clone it (make a copy in a "layer").This is the underlying frame-picture.
  3. resize the layer by 30%
  4. adjust the color with +level
  5. blur the layer
  6. add a black border around the image
  7. clone the original image again, This is the original picture on top of the frame-picture.
  8. draw a border raound this image
  9. delete the original image because it is not used anymore.
  10. center then images above each other and composite them
  11. 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"

For creating of self framed picture you can find a description in the usage pages of ImageMagick


look here





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:


  1. load the picture
  2. clone it (make a copy in a "layer").This is the underlying frame-picture.
  3. resize the layer by 30%
  4. adjust the color with +level
  5. blur the layer
  6. add a black border around the image
  7. clone the original image again, This is the original picture on top of the frame-picture.
  8. draw a border raound this image
  9. delete the original image because it is not used anymore.
  10. center then images above each other and composite them
  11. 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}"




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}"



You must be logged on to post a reply. Sign in now?


rss Latest comments – Subscribe to the comment feed for this topic.

 

Català | Čeština nové | 中文 | Deutsch | English | Español | Esperanto | Ελληνικά | Français | Galego | Italiano | Nederlands | Português | More...