Page 1 of 1

Have things gotten worse?

Posted: 2019-02-08T13:59:45-07:00
by kaldurak
I *was* able to resize images in the past on far less hardware, but it seems that things are trending down over the years.
I've got a TIFF image provided by the FAA for aviation sectionals (https://aeronav.faa.gov/content/aeronav ... tle_96.zip)
The image is fairly static between revisions (17869x12333 ~96mb)

I've noticed recent releases of ImageMagick tools are failing to read/convert/tile* images of this size regardless of the entries in policy.xml

I've got more than enough memory, drive space, etc to do the work - but alas I get resource limit errors.
An example of my resources (from convert -list resource)
Resource limits:

Code: Select all

  Width: 14.1MP
  Height: 14.1MP
  Area: 128MP
  Memory: 1GiB
  Map: 512MiB
  Disk: 1GiB
  File: 768
  Thread: 1
  Throttle: 0
  Time: unlimited
... so until these issues have been fixed I decided to write/share a sample app (in c#) for those of you who are having issues:
On linux install the mono-develop package and you can do mono-csc ./imgsplit.cs to compile it.

sample usage:

Code: Select all

./imgsplit.exe -input seattle.tif -outdir ./test -verbose
(ya it feels dirty to type .exe on a linux box)

Base64 encoded source:

Code: Select all

dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uSU87CnVzaW5nIFN5c3RlbS5EcmF3aW5nOwp1c2lu
ZyBTeXN0ZW0uRHJhd2luZy5JbWFnaW5nOwoKbmFtZXNwYWNlIEltYWdlU3BsaXR0ZXIKewoJcHVi
bGljIGNsYXNzIFByb2dyYW0KCXsKCgkJc3RhdGljIHZvaWQgU2hvd0hlbHAoKQoJCXsKCQkJQ29u
c29sZS5Xcml0ZUxpbmUoImltZ3NwbGl0IC1pbnB1dCA8ZmlsZT4gWy10aWxlIDx3aWR0aD54PGhl
aWdodD5dIFstb3V0ZGlyIDxkaXI+XSBbLW91dHR5cGUgPGltZ3R5cGU+XSBbLXZlcmJvc2VdIik7
CgkJCUNvbnNvbGUuV3JpdGVMaW5lKCJQYXJhbWV0ZXJzIik7CgkJCUNvbnNvbGUuV3JpdGVMaW5l
KCItaW5wdXQJCXNwZWNpZmllcyB0aGUgaW1hZ2UgZmlsZSB0by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QkJCX0KCQkJCX0KCQkJCWNhdGNoIChFeGNlcHRpb24gZXgp
CgkJCQl7CgkJCQkJQ29uc29sZS5FcnJvci5Xcml0ZUxpbmUoIlVuYWJsZSB0byBsb2FkIHswfTog
ezF9IixpbnB1dEZpbGUsZXguTWVzc2FnZSk7CgkJCQkJcmV0dXJuIDA7CgkJCQl9CgkJCX0gZWxz
ZQoJCQl7CgkJCQlDb25zb2xlLkVycm9yLldyaXRlTGluZSgiT3V0cHV0IGRpcmVjdG9yeSAnezB9
JyBkb2Vzbid0IGV4aXN0LiIsb3V0cHV0RGlyKTsKCQkJCXJldHVybiAwOwoJCQl9CgoJCQlyZXR1
cm4gMDsKCQl9Cgl9Cn0K
-- Enjoy

Re: Have things gotten worse?

Posted: 2019-02-08T16:57:09-07:00
by fmw42
Your tif file converts fine for me on IM 6.9.10.25 Q16 Mac OSX Sierra

Code: Select all

time convert -quiet Seattle_SEC_96.tif Seattle_SEC_96.jpg

real	0m17.310s
user	0m15.585s
sys	0m1.482s
My resources are:

Code: Select all

Resource limits:
  Width: 214.7MP
  Height: 214.7MP
  List length: 18.446744EP
  Area: 17.18GP
  Memory: 8GiB
  Map: 16GiB
  Disk: unlimited
  File: 192
  Thread: 4
  Throttle: 0
  Time: unlimited
Please always provide your IM version, date and platform/OS

Re: Have things gotten worse?

Posted: 2019-02-09T10:51:16-07:00
by kaldurak
I'll update my policy to match your values and try again - then post my results -thx

I'm a bit frustrated because I was doing this on older hardware without issue (on slackware 8+ years ago), so I'm curious what has changed, and why?

Re: Have things gotten worse?

Posted: 2019-02-09T11:08:38-07:00
by kaldurak
@fmw42 - thanks- I've updated my policy to match your settings and that worked.

Re: Have things gotten worse?

Posted: 2019-02-09T12:42:15-07:00
by magick
Are you using ImageMagick version 7? If so, by default, HDRI is enabled. HDRI is 32-bit float pixels. Disable HDRI and memory requirements are halved. With HDRI enabled, it took several minutes to resize your image to 10% its original size. With HDRI disabled, it took less than 7 seconds. For this image, given it is so large, floating point exceeds the available memory and pixels are moved to disk instead. Reading/writing disk is quite slow compared to memory and accounts for the exhibited time difference.

Re: Have things gotten worse?

Posted: 2019-10-07T18:27:31-07:00
by niyanwen
how to disable hdri? can I disable in the image magick command?

Re: Have things gotten worse?

Posted: 2019-10-07T18:51:31-07:00
by fmw42
Not that I know. I think you have to recompile.