I want to "extend" the contents of this image to eliminate the white border, so that when it's printed and cut out the color will go all the way to the final edge regardless of where the cuts are made. Is there a straightforward way to do this?
turn image with borders into full bleed image
Re: turn image with borders into full bleed image
I may be willing to crop the image to get rid of the rounded corners, if that's helpful.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: turn image with borders into full bleed image
This is a unix syntax solution. Note I have to shave off 10 pixel on each side after trimming to remove the rounded corners
see
http://www.imagemagick.org/script/escape.php
http://www.imagemagick.org/Usage/distor ... t_viewport
This also works by trimming and making the corners transparent. Then measuring the color at the rounded corners and using -sparse-color voronoi to fill out the whole image with those colors. Then overlay the the transparent image over the result of the voronoi processed image. This way no shaving is needed.
See
http://www.imagemagick.org/Usage/canvas/#voronoi
Code: Select all
size=`convert nfuqC0r.png -format "%wx%h" info:`
convert nfuqC0r.png -trim tmp.png
xoff=`convert tmp1.png -format "%X" info: | sed 's/+//g'`
yoff=`convert tmp1.png -format "%Y" info: | sed 's/+//g'`
xoff=$((xoff-10))
yoff=$((yoff-10))
vcoords="$size-$xoff-$yoff"
echo $vcoords
convert tmp.png +repage -shave 10x10 \
-define distort:viewport=$vcoords +distort SRT 0 +repage result.png
rm -f tmp.png
see
http://www.imagemagick.org/script/escape.php
http://www.imagemagick.org/Usage/distor ... t_viewport
This also works by trimming and making the corners transparent. Then measuring the color at the rounded corners and using -sparse-color voronoi to fill out the whole image with those colors. Then overlay the the transparent image over the result of the voronoi processed image. This way no shaving is needed.
Code: Select all
size=`convert nfuqC0r.png -format "%wx%h" info:`
convert nfuqC0r.png -trim tmp.png
xoff=`convert tmp1.png -format "%X" info: | sed 's/+//g'`
yoff=`convert tmp1.png -format "%Y" info: | sed 's/+//g'`
vcoords="$size-$xoff-$yoff"
echo $vcoords
convert tmp.png -transparent white +repage \( -clone 0 -alpha off -sparse-color Voronoi \
"9,9 rgb(255,8,8) 969,9 rgb(255,255,8) 969,669 rgb(255,255,248) 9,669 rgb(255,248,248)" \) \
+swap -compose over -composite \
-define distort:viewport=${size}-$xoff-$yoff +distort SRT 0 +repage result2.png
rm -f tmp.png
http://www.imagemagick.org/Usage/canvas/#voronoi