Too difficult for me, sorry
Can someone help me make a command line for ImageMagick that's will create a cross corners frame with edges length relative to the size of the window/picture size?
Here is a screenshot of how I'm doing/programming it now..
Thanks anyway
Create cross corners frame
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Create cross corners frame
This goes a bit further than what you want, but it might give you some ideas.
http://www.imagemagick.org/Usage/thumbn ... e_extended
Alternately, compute the size of the image that needs the border added, use the sizes to compute the end points you want. Then just draw lines using -draw. see http://www.imagemagick.org/Usage/draw/#primitives
http://www.imagemagick.org/Usage/thumbn ... e_extended
Alternately, compute the size of the image that needs the border added, use the sizes to compute the end points you want. Then just draw lines using -draw. see http://www.imagemagick.org/Usage/draw/#primitives
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Create cross corners frame
try this, which I modified from http://www.imagemagick.org/Usage/thumbn ... e_extended:
convert -size 1x1 xc:white border.gif
convert thumbnail.gif -matte -bordercolor none -border 34 \
\( -size 144x2 -tile-offset +30+0 tile:border.gif -transpose \) \
-geometry +32+10 -composite \
\( -size 144x2 -tile-offset +45+0 tile:border.gif -transpose \) \
-geometry +154+0 -composite \
\( -size 178x2 -tile-offset +60+0 tile:border.gif \) \
-geometry +0+32 -composite \
\( -size 178x2 -tile-offset +0+0 tile:border.gif \) \
-geometry +10+124 -composite \
thumbnail_frame.gif
convert -size 1x1 xc:white border.gif
convert thumbnail.gif -matte -bordercolor none -border 34 \
\( -size 144x2 -tile-offset +30+0 tile:border.gif -transpose \) \
-geometry +32+10 -composite \
\( -size 144x2 -tile-offset +45+0 tile:border.gif -transpose \) \
-geometry +154+0 -composite \
\( -size 178x2 -tile-offset +60+0 tile:border.gif \) \
-geometry +0+32 -composite \
\( -size 178x2 -tile-offset +0+0 tile:border.gif \) \
-geometry +10+124 -composite \
thumbnail_frame.gif
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Create cross corners frame
Of course in this case the frame is just a solid color, so just adding a transparent border, and drawing the appropriate edge lines will do the job.
For course you can also just overlay the image first then draw the lines too!
For course you can also just overlay the image first then draw the lines too!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Create cross corners frame
Thanks for trying fmw42, but the result is not good
The left vertical border is missing and the others are not aligned properly.
Also looking at your code it seems that dimensions are being passed which I thought ImageMagick will calculate automatically!
The left vertical border is missing and the others are not aligned properly.
Also looking at your code it seems that dimensions are being passed which I thought ImageMagick will calculate automatically!
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Create cross corners frame
You can adjust the dimensions to make it suit. In this code it will not automatically compute the coordinates. To do so you need to write a short script that accesses the images, computes their sizes and draws lines that are some percent bigger.Mahroun wrote:Thanks for trying fmw42, but the result is not good
The left vertical border is missing and the others are not aligned properly.
Also looking at your code it seems that dimensions are being passed which I thought ImageMagick will calculate automatically!
If you can provide the two images you are using and the placement of the inserted image, then we can probably do that for you. However, I only know bash shell scripting and know nothing about Windows. So if you are on windows, then someone else will need to help.