Search found 310 matches

by whugemann
2019-12-26T11:33:12-07:00
Forum: Users
Topic: -geometry widthxheight<
Replies: 13
Views: 3643

Re: -geometry widthxheight<

Correction: The most efficient code is of cause

Code: Select all

-extent "%%[fx:max(w,%OW%)]x%%[fx:max(h,%OH%)]"
as you can address the input image's width and height directly.
However, this code does only work with IM 7. In my understanding the functionaly of fx has been extended with IM 7 (?).
by whugemann
2019-12-24T09:27:59-07:00
Forum: Users
Topic: Trimming montage-d images
Replies: 3
Views: 1563

Re: Trimming montage-d images

So far I thought that ":-" defaults to miff.
But you are right: When using "png:-", "miff:-" or just "-", piping works correctly with IM 7.
by whugemann
2019-12-24T08:45:29-07:00
Forum: Users
Topic: Trimming montage-d images
Replies: 3
Views: 1563

Trimming montage-d images

When doing a montage with some distance between the individual images, one gets a white border surrounding the montage image. With IM 6 I used to get rid of this white border by piping it to convert and using either -trim or -shave , i.e. montage rose: rose: rose: rose: -tile 2x2 -geometry x+8+8 :- ...
by whugemann
2019-12-24T08:26:30-07:00
Forum: Users
Topic: How can I merge this 8 small images into 1 big image?
Replies: 4
Views: 1805

Re: How can I merge this 8 small images into 1 big image?

montage.exe resp. magick.exe montage is the suitable tool:

Code: Select all

magick montage out_%02d.jpg -tile 4x2 -geometry x+0+0 module_again.jpg
The option -geometry x+0+0 garantuees seamless montaging.
by whugemann
2019-12-22T01:35:46-07:00
Forum: Users
Topic: Point picker GUI under Windows?
Replies: 6
Views: 1962

Re: Point picker GUI under Windows?

Thanks, the decisive hint was the sparse-color: format, which I didn't know of. In order to make the point marker extraction reliable in a JPEG environment, I would have to make the user draw larger dots. Which is fine, as these can be seen more easily on a large photo. After applying the +transpare...
by whugemann
2019-12-21T09:34:47-07:00
Forum: Users
Topic: Point picker GUI under Windows?
Replies: 6
Views: 1962

Re: Point picker GUI under Windows?

snibgo wrote:
2019-12-21T09:00:04-07:00
The script then finds the four red pixels.
Well, could you make a suggestion how this could actually be done? How can I get IM to spit out the coordinates of the four red pixels to the console or a text file?
by whugemann
2019-12-21T08:10:07-07:00
Forum: Users
Topic: Point picker GUI under Windows?
Replies: 6
Views: 1962

Point picker GUI under Windows?

This might be a little bit off topic, but could you think of a suitable GUI that could run a Windows cmd-Script or alike, providing it with a file with pixel coordinates? The question arises in the context of a recently written script that rectifies photographs by means of IM's -distort perspective ...
by whugemann
2019-12-21T00:13:23-07:00
Forum: Users
Topic: -geometry widthxheight<
Replies: 13
Views: 3643

Re: -geometry widthxheight<

magick wizard: -extent %[fx:max(1000/w,3000/h)*100)]% result.png Your answer set me on the right track. The most efficient code for me is -extent "%%[fx:max(%IW%,%OW%)]x%%[fx:max(%IH%,%OH%)]" where IW and IH are the input images width and height and OW and OH are the output images width and height....
by whugemann
2019-12-16T08:53:33-07:00
Forum: Users
Topic: can't estimate the jpeg quality
Replies: 2
Views: 1614

Re: can't estimate the jpeg quality

The JPEG quality was not defined by the original JPEG standard. It was introduced only later by the Independent JPEG Group's code (IJG), setting the quality of the DQTs in the original JPEG standard to 50% and providing a scaling algorithm for the matrix elements. Thus the JPEG quality can only be r...
by whugemann
2019-12-16T08:36:23-07:00
Forum: Users
Topic: -geometry widthxheight<
Replies: 13
Views: 3643

Re: -geometry widthxheight<

Returning to my original problem after a few days off, I had to discover that the trick doesn't work with -extent , as magick -size 300x200 xc:yellow -extent 200x400^<! rs2.png does not yield the same dimensions as magick -size 300x200 xc:yellow -resize 200x400^<! rs.png With -extent it's still 200x...
by whugemann
2019-12-06T15:39:26-07:00
Forum: Users
Topic: -geometry widthxheight<
Replies: 13
Views: 3643

Re: -geometry widthxheight<

Thank you, Fred,

Code: Select all

magick -size 300x200 xc:yellow -resize 200x400^<! rs.png
does the trick I need here under Windows. I did not know that you can combine the modifiers. Is that mentioned anywhere? Surely not in the corresponding section of Anthony's Usage pages (?).
by whugemann
2019-12-06T01:56:55-07:00
Forum: Users
Topic: Spreadsheet Fed Variable Inputs?
Replies: 4
Views: 1962

Re: Spreadsheet Fed Variable Inputs?

If I would have all the information in a spreadsheet, I would use the spreadsheet application to create the right commands and export them to a script file. Thus the basic trick is to do something like (Excel code): =concatenate("magick -size ",A1," label:",A2," ",A3) assuming you have the sizes in ...
by whugemann
2019-12-06T01:42:36-07:00
Forum: Users
Topic: -geometry widthxheight<
Replies: 13
Views: 3643

Re: -geometry widthxheight<

Not all operations with {geometry} can use modifiers such as "<". I think this is a general "misbehaviour" of this modifier. Try magick -size 300x200 xc:yellow -resize 200x400< rs.png It leaves the image at 300x200 pixel, whereas I would expect it to have 300x400 after resizing. (In the Windows cmd...
by whugemann
2019-12-06T01:14:25-07:00
Forum: Users
Topic: -geometry widthxheight<
Replies: 13
Views: 3643

Re: -geometry widthxheight<

But using +distort rather than -distort will expand the canvas automatically without the need to enlarge your input. My results with +distort perspective are not very promising. Try: magick -size 300x200 xc:white -draw "polyline 50,180 260,180 120,80 100,80" rect.png magick rect.png -virtual-pixel ...
by whugemann
2019-12-05T11:32:22-07:00
Forum: Users
Topic: -geometry widthxheight<
Replies: 13
Views: 3643

-geometry widthxheight<

At https://imagemagick.org/script/command-line-processing.php#geometry is says that the modifier < enlarges an image with dimension(s) smaller than the corresponding width and/or height argument(s). I am trying to rectify a perspective photograph with ImageMagick in a CMD batch file under Windows, p...