Search found 41 matches

by djd
2019-03-09T21:45:48-07:00
Forum: Users
Topic: Trimming Noisy Images - another robust solution
Replies: 9
Views: 57324

Re: Trimming Noisy Images - another robust solution

The clever script presented by Hugo Rune and approved by IM elders Anthony and Fred, is not quite so robust for me. The original version of IM is not stated but the year was 2009. The versions I am using on Windows and Ubuntu are both: IM 6.8.7-4 2013-10-26 Q16 a) For the -scale option, the number ...
by djd
2018-10-29T04:27:21-07:00
Forum: Users
Topic: Text to image with Chinese characters
Replies: 1
Views: 4935

Text to image with Chinese characters

The following script appears to work OK with normal text # Convert text in a text file to an image # # text2image.ksh Name.txt # # Produces: Nametext.png N=$(basename $1 .txt) M="$N""Text" imgconvert -size 1000x1000 xc:white -font "SimSun" -pointsize 56 \ -fill black -annotate +15+80 "@$N.txt" \ "$M ...
by djd
2017-07-19T00:16:05-07:00
Forum: Users
Topic: Inconsistent Font Metrics
Replies: 0
Views: 12025

Inconsistent Font Metrics

The convert -debug option offers various font metrics: convert -debug annotate xc: -font Arial -pointsize "30" \ -annotate 0 'A' null: 2>&1 | \ grep Metrics: Using this to extract ascent, descent, height, produces: pointsize=20 ascent=19 descent=-5 height=23 pointsize=24 ascent=22 descent=-6 height ...
by djd
2017-06-30T19:46:36-07:00
Forum: Users
Topic: The effect of + and - before options
Replies: 2
Views: 4842

The effect of + and - before options

In another post, snibgo mentioned something of which I was not aware but is useful to know. Snibgo wrote: "Most, if not all, settings have "+" option to set the default value." If this is the case, then maybe `antialias' is an exception as when creating an image, the default behaviour is to ...
by djd
2017-06-30T19:28:16-07:00
Forum: Users
Topic: composite, parenthesis, -gravity problems
Replies: 6
Views: 9886

Re: composite, parenthesis, -gravity problems

Thanks GeeMack - that is brilliant!
There is no doubt IM is a powerfull and intriguing bunch of software, but that implies a casual user such as myself will never completely master it.

Thanks again.
by djd
2017-06-30T06:39:12-07:00
Forum: Users
Topic: composite, parenthesis, -gravity problems
Replies: 6
Views: 9886

Re: composite, parenthesis, -gravity problems

# Draw a scale with tick marks given the length and number of divisions Thanks Snibgo for mentioning the +gravity. I have always found gravity somewhat mysterious and +gravity is not mentioned in the IM command options web pages, but I guess I should have thought of it as a possible cure. Yes ...
by djd
2017-06-29T09:32:50-07:00
Forum: Users
Topic: Locating precise text position
Replies: 5
Views: 9539

Re: Locating precise text position

Thanks for the info GeeMack
by djd
2017-06-29T09:03:21-07:00
Forum: Users
Topic: composite, parenthesis, -gravity problems
Replies: 6
Views: 9886

composite, parenthesis, -gravity problems

The script below places pre-prepared rectangles containing numbers 27-0 along a line (scale50.png) of given length at approximately(1.) equal intervals. It works OK. ###################### script #################################### imgconvert -size 727x20 xc:'white' scale50.png while [ i -le 27 ...
by djd
2017-06-28T17:50:18-07:00
Forum: Users
Topic: Locating precise text position
Replies: 5
Views: 9539

Re: Locating precise text position

Thanks to both snibgo and GeeMack.
Removing sed and leaving everything to IM appeals as the more `elegant' way.
I also need to become familiar with `fx'.
by djd
2017-06-28T06:22:44-07:00
Forum: Users
Topic: Locating precise text position
Replies: 5
Views: 9539

Locating precise text position

The following seems to work (at least with two test numerics) but it appears overly complex. Is there a better way? # Given text of arbitary font size inside a box, find the x-position of # the first pixel of the text F=27 imgconvert -size 40x50 xc:none -pointsize 13 -fill black -gravity center ...
by djd
2017-06-28T04:58:23-07:00
Forum: Users
Topic: Metric called `origin' is what?
Replies: 0
Views: 10651

Metric called `origin' is what?

convert -debug annotate xc: -font Arial -pointsize 40 \ -annotate 0 'g' null: 2>&1 |\ grep Metrics: | fmt -w80 Metrics: text: g; width: 20; height: 46; ascent: 37; descent: -9; max advance: 80; bounds: 2,-8 20,21; origin: 22,0; pixels per em: 40,40; underline position: -3.39063; underline thickness ...
by djd
2017-05-01T20:53:31-07:00
Forum: Users
Topic: Extract coordinates of similar features
Replies: 1
Views: 6345

Extract coordinates of similar features

Is there a script available which can extract the pixel coordinates of similar features in an image?
For example, the location of each of 20 bullet holes in a target.
djd
by djd
2013-11-21T21:04:33-07:00
Forum: Users
Topic: A way to get show:/win: working on Windows XP
Replies: 0
Views: 7777

A way to get show:/win: working on Windows XP

Thanks to snibgo and Chris for sharing insights and knowledge guiding the following. The short answer to the "win:" problem is described in the last few lines of this post, the long answer following here, includes how it came to be that. Here is the "win:" line from the original delegates.xml file ...
by djd
2013-11-21T20:46:51-07:00
Forum: Users
Topic: How can "show:", "win:" be made to work
Replies: 12
Views: 15768

Re: How can "show:", "win:" be made to work

Thanks for the help snibgo and chris (who is elsewhere). The use of the batch file myview.bat in delegates.xml does allow "win:" to work. The problem has been around a long time with no `fix' I have seen. So I have created a new post to describe this fix more directly and how it arose. The title is ...
by djd
2013-11-19T17:39:57-07:00
Forum: Users
Topic: How can "show:", "win:" be made to work
Replies: 12
Views: 15768

Re: How can "show:", "win:" be made to work

I remain confused: C:\>cmd /C "C:/myview2.bat" "C:/windows/TEMP/star.gif" The filename, directory name, or volume label syntax is incorrect. C:\>cmd /C C:/myview2.bat "C:/windows/TEMP/star.gif" % Works! C:\>cmd /C "C:/myview2.bat" C:/windows/TEMP/star.gif % Works! C:\>cmd /C C:/myview2.bat C ...