Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
- Posts: 4
- Joined: 2020-02-05T06:57:42-07:00
- Authentication code: 1152
I have installed ImageMagickV6 on my linux machine since forever, and recently setup this command to process a distorted image:
Code: Select all
convert ref_25X.tif -virtual-pixel Gray +distort Plane2Cylinder 60 MIFF:- | \
convert - -rotate 90 MIFF:- | \
convert - -virtual-pixel Gray +distort Plane2Cylinder 50 MIFF:- | \
convert - -rotate -92 MIFF:- | \
convert - -distort Perspective '10,10 10,10 10,1000 10,1000 1280,10 1280,30 1280,1000 1280,980' MIFF:- | \
convert - -shave 80x100 plane1.png
Since the final application will run on a windows machine I copied it there, to discover that on that machine the installed version is IMv7. And with v7 the way the command line is processed is radically changed, as described in https://imagemagick.org/script/command- ... essing.php
So I tried to re-learn how to deal with distortion correction in V7, and discovered that the index page https://imagemagick.org/index.php
links to the V6 help https://imagemagick.org/Usage/distorts/
so it is unusable!!!
Can somebody show me how to deal with this in IMv7 ?
- Posts: 12922
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
That's a crazy command. Each "convert" writes an image to a pipe, which is read by another "convert". Why not do all the operations in a single call to "convert", with no intermediate writes?
But that is just an efficiency issue. It shouldn't cause a failure or problems.
I can't see what problems that would give in v7. What error message do you get? What goes wrong?
Perhaps the clue is "... will run on a windows machine I copied it there, ...". You show bash syntax, with \ for line-continuation, and single quotes. Are you running this in a BAT script, or what? For Windows, use caret ^ as line-continuation, and double-quotes in the perspective list.