Search found 5 matches
- 2017-10-10T04:14:40-07:00
- Forum: Users
- Topic: Generate image with variable size and get dimensions before image is created
- Replies: 10
- Views: 7714
Re: Generate image with variable size and get dimensions before image is created
You could create 2 small white (or transparent) images and then use -gravity to composite them at the center top/bottom and center left/right sides over the black border. Thanks - I've tried that with the below script. It works well enough for my purposes for now. Thanks for the help! #!/bin/bash ...
- 2017-10-09T14:44:38-07:00
- Forum: Users
- Topic: Generate image with variable size and get dimensions before image is created
- Replies: 10
- Views: 7714
Re: Generate image with variable size and get dimensions before image is created
Perhaps draw the text first and pad as desired using label:. Then get the dimensions of the image. Then draw you lines. Or after you create the image, put a black border around it of the desired thickness. Then draw short white (background color) lines in the middle of the border on all four sides ...
- 2017-10-09T14:28:16-07:00
- Forum: Users
- Topic: Generate image with variable size and get dimensions before image is created
- Replies: 10
- Views: 7714
Re: Generate image with variable size and get dimensions before image is created
There are many ways of doing this. For example, we can create an image, then use "-chop" to remove a central set of columns and rows, then "-splice" to put them back, but white. This has also done the same to text, so we first save that in memory (mpr:), and composite that back afterwards. This is ...
- 2017-10-09T08:27:59-07:00
- Forum: Users
- Topic: Generate image with variable size and get dimensions before image is created
- Replies: 10
- Views: 7714
Re: Generate image with variable size and get dimensions before image is created
Sure - here's an example of what I'm trying to create. You'll see that there is a black border around the text with a gap on each edge of the border. The size of the gap is fixed (or, at least, proportional only to the height of the text but that is fixed for my purposes), but its position varies ...
- 2017-10-09T02:57:41-07:00
- Forum: Users
- Topic: Generate image with variable size and get dimensions before image is created
- Replies: 10
- Views: 7714
Generate image with variable size and get dimensions before image is created
I am writing a logo generator. The logo is simple - it is text of varying length (imagine a clothing store that has BRAND: WOMEN and BRAND: MEN etc.) surrounded by a black box. The black box has four gaps in it at the top, middle left, middle right and bottom. The width of these gaps is fixed. I ...