Page 1 of 1

Multicrop fails to output files

Posted: 2019-10-14T22:50:10-07:00
by mib
I tried multicrop script on cygwin. After it excuted, there is no output files.
:(

Code: Select all

$ multicrop -f 10 -u 2 3ladies1.jpg lady.jpg
width=660; height=588; wg=66; hg=59; num=8

66 59 1 red
Processing Image 0
Initial Crop Box: 267x268+18+14

/cygdrive/c/cimgtest/multicrop:line 618: unrotate: command not found
convert.exe: unable to open image './multicrop_5_1487.miff': No such file or directory @ error/blob.c/OpenBlob/3497.
convert.exe: no images defined `lady-000.jpg' @ error/convert.c/ConvertImageCommand/3273.
132 59 0 none
198 59 0 none
264 59 0 none
330 59 0 none
396 59 0 none
462 59 0 none
528 59 0 none
594 59 0 none
66 118 0 none
132 118 0 none
198 118 0 none
264 118 0 none
330 118 1 red
Processing Image 1
Initial Crop Box: 329x416+317+82

/cygdrive/c/cimgtest/multicrop:line 618: unrotate: command not found
convert.exe: unable to open image './multicrop_5_1487.miff': No such file or directory @ error/blob.c/OpenBlob/3497.
convert.exe: no images defined `lady-001.jpg' @ error/convert.c/ConvertImageCommand/3273.
396 118 0 none
462 118 0 none
528 118 0 none
594 118 0 none
66 177 0 none
132 177 0 none
198 177 0 none
264 177 0 none
330 177 0 none
396 177 0 none
462 177 0 none
528 177 0 none
594 177 0 none
66 236 0 none
132 236 0 none
198 236 0 none
264 236 0 none
330 236 0 none
396 236 0 none
462 236 0 none
528 236 0 none
594 236 0 none
66 295 0 none
132 295 0 none
198 295 0 none
264 295 0 none
330 295 0 none
396 295 0 none
462 295 0 none
528 295 0 none
594 295 0 none
66 354 1 red
Processing Image 2
Initial Crop Box: 269x269+17+303

/cygdrive/c/cimgtest/multicrop:line 618: unrotate: command not found
convert.exe: unable to open image './multicrop_5_1487.miff': No such file or directory @ error/blob.c/OpenBlob/3497.
convert.exe: no images defined `lady-002.jpg' @ error/convert.c/ConvertImageCommand/3273.
132 354 0 none
198 354 0 none
264 354 0 none
330 354 0 none
396 354 0 none
462 354 0 none
528 354 0 none
594 354 0 none
66 413 0 none
132 413 0 none
198 413 0 none
264 413 0 none
330 413 0 none
396 413 0 none
462 413 0 none
528 413 0 none
594 413 0 none
66 472 0 none
132 472 0 none
198 472 0 none
264 472 0 none
330 472 0 none
396 472 0 none
462 472 0 none
528 472 0 none
594 472 0 none
66 531 0 none
132 531 0 none
198 531 0 none
264 531 0 none
330 531 0 none
396 531 0 none
462 531 0 none
528 531 0 none
594 531 0 none

Re: Multicrop fails to output files

Posted: 2019-10-14T22:52:52-07:00
by mib

Code: Select all

$ magick -version
Version: ImageMagick 7.0.8-68 Q16 x64 2019-10-05 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2018 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Visual C++: 180040629
Features: Cipher DPC Modules OpenCL OpenMP(2.0)
Delegates (built-in): bzlib cairo flif freetype gslib heic jng jp2 jpeg lcms lqr lzma openexr pangocairo png ps raw rsvg tiff webp xml zlib

Re: Multicrop fails to output files

Posted: 2019-10-14T23:00:25-07:00
by snibgo
You use "-u 2" which, as the script says, calls Fred's unrotate script. The error message "unrotate: command not found" suggests you don't have that.

Re: Multicrop fails to output files

Posted: 2019-10-14T23:55:09-07:00
by mib
Thanks. I misunderstand the exsample. Now it works.

It takes about 10 mins to divide a 5800*8000 jpg which include 3 pics. How can I accelerate the process?

Intel Core i5-6500 CPU @3.2GHz
RAM 4GB
Windows 10 64bit

Re: Multicrop fails to output files

Posted: 2019-10-15T03:11:02-07:00
by magick
See https://imagemagick.org/script/architecture.php. Its likely you ran out of heap memory so the image pixels are pushed to disk. You can verify by adding -debug cache to your command-line. The debugging output tells you where the cache resides (e.g. memory, disk, etc.). On our 32GB system, we cropped 3 slices from 1 5800x8000 JPEG image, and it completed in less than 1/2 second. The performance suggests that the pixel cache was hosted in memory rather than disk.

Re: Multicrop fails to output files

Posted: 2019-10-15T06:45:04-07:00
by mib
1/2 seconds vs. 10 mins :shock:
I should seriously consider upgrading the memory. :?