2019.04.24 15:31 "Re: [Tiff] TIFFWriteScanLine - buffers to RAM before flushing to disc?", by Bob Friesenhahn
>> Why do you allocate a buffer using _TIFFmalloc() and use memcpy() if
>> you could just pass the address (myOpenCV.data + myOpenCV.step * y) as
>> 'buf' to TIFFWriteScanline()?
> Good question. I inherited this code. No need for the intermediate buffer.
I am thinking that you should investigate how OpenCV works. This is
appears to be powerful C++ code which provides a wrapper for the
pixels. Perhaps it is actually OpenCV which is allocating memory
based on your access request since the underlying pixel store might
not be compatible with simple linear byte access and so it needs to
allocate temporary memory.
Libtiff was primarily written a long time ago when computers provided
very little memory (most computers at the time did not provide more
than 640k of RAM) so its implementation tries to be memory-efficient,
although it was implemented on SGI workstations which offered much
more memory than a typical PC.
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
Public Key, http://www.simplesystems.org/users/bfriesen/public-key.txt