Search found 11339 matches

by snibgo
2019-03-23T04:49:58-07:00
Forum: Users
Topic: Watermark color depending on the background
Replies: 3
Views: 80

Re: Watermark color depending on the background

For example, bash syntax:

Code: Select all

PERCENT=$(convert \
  toes.png \
  -gravity East \
  -crop 40x200+0+0 +repage \
  -format "%[fx:mean<0.5?100:0]" \
  info:)
For the fill in the command that annotates or labels the image, use:

Code: Select all

-fill "gray($PERCENT%)"
by snibgo
2019-03-23T03:30:03-07:00
Forum: Users
Topic: Watermark color depending on the background
Replies: 3
Views: 80

Re: Watermark color depending on the background

What version of IM, on what platform? The basic idea is to crop the desired rectangle, and find the average lightness. If this is less than 50% (or whatever threshold you want) the text will be white, otherwise black. With v7 this can probably be done in one command. In v6 it will need a shell script.
by snibgo
2019-03-22T07:33:39-07:00
Forum: Users
Topic: drawing the complex shapes in imagemagick
Replies: 1
Views: 47

Re: drawing the complex shapes in imagemagick

I'm not sure what you want.

The first polyline has only two points so merely draws a straight line.
The second polyline draws a rectangle.
The third polyline draws a large triangle.
If that's not what you want, then what do you want?
by snibgo
2019-03-21T14:33:12-07:00
Forum: Users
Topic: Scanned piano sheets enhancement
Replies: 1
Views: 68

Re: Scanned piano sheets enhancement

"-contrast-stretch 10x60%" does your steps 2, 3 and 4. Step 1 isn't needed.

However, your input is weird. It has essentially four shades of gray. I suspect it has been processed somehow. Use a better scan, if you can.
by snibgo
2019-03-21T11:33:14-07:00
Forum: Users
Topic: Batch Merge Alpha and RGB images together (same filenames - different extensions)
Replies: 2
Views: 76

Re: Batch Merge Alpha and RGB images together (same filenames - different extensions)

What version IM, on what platform? I assume IM v6 on Windows. You want to loop through all the PNG files, or all the TIFF files, but not both. Instead of "*", I suggest "*.png". Within the convert command, you use %g which is the drive, directory, name and extension. I suggest "%~dpng.png" and "%~dp...
by snibgo
2019-03-21T09:53:58-07:00
Forum: Bugs
Topic: Errors on batch processing
Replies: 4
Views: 222

Re: Errors on batch processing

It depends on your computer and operating system. On my computer (HP laptop, running Windows 8.1) when I run a series of commands in one window, each command won't start until the previous command has fully written and closed any files. But I might run a series of commands in one window, and another...
by snibgo
2019-03-21T06:20:23-07:00
Forum: Bugs
Topic: Failed to convert PNG file with error " IDAT: invalid distance too far back"
Replies: 3
Views: 96

Re: Failed to convert PNG file with error " IDAT: invalid distance too far back"

I get the same error message from IM.

Gimp can read the file with no complaint, but shows an image that is different to that shown on the web download page.

I suppose sample.png is corrupt.
by snibgo
2019-03-21T06:18:05-07:00
Forum: Users
Topic: Strange Problem - Stroke is cut on half text
Replies: 8
Views: 211

Re: Strange Problem - Stroke is cut on half text

I suspect a problem in the font, with strokes. I suggest you find the minimum command that shows the problem. For example, remove the first annotate and blur. Try an annotate with fill but no stroke, then with stroke but no fill. If this shows the font has a stroke problem, then the cure is to use a...
by snibgo
2019-03-20T11:25:38-07:00
Forum: Bugs
Topic: Facing Error while I try convert compressed tiff image(Group4 - CCITT_T.6) to PNG, using ImageMagick's convert.exe?
Replies: 6
Views: 194

Re: Facing Error while I try convert compressed tiff image(Group4 - CCITT_T.6) to PNG, using ImageMagick's convert.exe?

The "ResolutionUnit" error prevents IM from reading and processing the file.

As a workaround, the program tiffcp reports the error but allows processing, writing a result without the problem, that can then be processed by IM.
by snibgo
2019-03-20T08:40:17-07:00
Forum: Users
Topic: Unable to do PDF comparison
Replies: 15
Views: 3947

Re: Unable to do PDF comparison

For the use of "null:", see http://www.imagemagick.org/script/command-line-options.php#layers , method "composite". When you have a difference image that is black where there is no difference, you can process that image, eg "-auto-level", or "-fill white +opaque black" to turn all non-black into whi...
by snibgo
2019-03-20T07:23:28-07:00
Forum: Users
Topic: Converting any image to 16 colour BMP (4 bits depth) as in MS Paint
Replies: 6
Views: 235

Re: Converting any image to 16 colour BMP (4 bits depth) as in MS Paint

If One_t.bmp contains certain colours. If you want to reduce One.jpg to exactly those colours, and no more, then use "-remap" like this: magick One.jpg +dither -remap One_t.bmp out.png Those colours are a poor selection to represent the image. IM options "-colors" and "posterize" will not select tho...
by snibgo
2019-03-20T06:13:11-07:00
Forum: Users
Topic: Unable to do PDF comparison
Replies: 15
Views: 3947

Re: Unable to do PDF comparison

"-highlight-color" is available when you are using "magick compare". When you are not using "magick compare", there is no concept of a highlight color, and the option is not available. Fred showed you how to compare two PDF documents with the same number of pages, using a "null:" and "-compose diffe...
by snibgo
2019-03-19T07:27:28-07:00
Forum: Users
Topic: Add border to large image
Replies: 5
Views: 190

Re: Add border to large image

On Windows, by default, IM uses %TEMP%.

Code: Select all

f:\web\im>set TEMP
TEMP=C:\Users\Alan\AppData\Local\Temp
On my computer, this is on drive C: . I can tell IM to use D: instead

Code: Select all

C:
D:\>md \temp
D:\>set MAGICK_TEMPORARY_PATH=D:\temp
by snibgo
2019-03-19T06:26:27-07:00
Forum: Users
Topic: Convert low DPI to high DPI
Replies: 2
Views: 104

Re: Convert low DPI to high DPI

As your other problem:
mail2vguna wrote:No space left on device
Get a larger device. This would be the disk drive.
by snibgo
2019-03-19T06:25:27-07:00
Forum: Users
Topic: Add border to large image
Replies: 5
Views: 190

Re: Add border to large image

mail2vguna wrote:No space left on device
Get a larger device. This would be the disk drive. At 8 bytes per pixel, your image needs 5 GB of memory before adding the border. If you don't have enough memory, IM will use disk, but it seems you don't have enough space on that.