Hi Bob,
This is not technically a request as I would be willing to put up the change. I just wanted to get your view on it before I dive in. I have seen identify commands like getting the image format take much longer for HEIC images than for JPG. Where a JPG might take 20ms to get the image format, an HEIC image can take a more than a second.
I suspect what is going on is that the libheif library is being initialized. If that is the case it would seem that we could avoid that for some identify commands. Again, I'm speculating on the cause. Let me know what you think and if you think this might be the root cause and if I were to put up a patch whether this type of change is something you would approve. Thanks, I very much appreciate all your hard work.
Thanks for bringing the strange pause to my attention. The problem is not with library initialization. The problem is that the default identify 'ping' mode is not being respected. I am investigating.
The problem is that 'ignore_transformations' is false by default and so it does some file decoding to find the real image dimensions and some other info. Adding this to the identify request makes it go fast:
If the default condition is changed, then it will be fast by default, but then the user must specify
-define heif:ignore-transformations=false
In order to assure accurate dimensions (e.g. in case the image is rotated).
Bob
I have submitted this change:
in this Mercurial changeset:
Bob
Wow! Thanks Bob!
I got hit by the flu, so was down the past few days with a high fever. I was just feeling better so I thought I would check if you had responded and here I find not only have you responded, but you have given me the fix. Feeling even better now, thanks again!