snibgo wrote:Personally, when I write to tiff, I always specify the compression unless I know the input is from a tiff that I have written.
I think that's good advice. And when it's good advice to always change the default behavior, that usually means that the "good advice" behavior should *be* the default.
I think it's an even more important principle to preserve the image *data* created by processing operations, rather than to discard some of it in order to preserve a *setting* internal to one of the input files.
IM is not merely a format conversion tool that attempts to preserves some characteristics of the input format in the output. Straight conversion is a vary narrow special case; if you do two dozen operations with multiple input images in different formats, what you're "preserving" isn't the original image, it's a (perhaps very) different image that' you've gone to great deal trouble to create. I think a more important principle is to not discard some of this hard-produced image data lossily in order to "preserve" a setting (rather than the image data) of perhaps only one of the input files that was read in before the two dozen operations.
Anyway, the internal compression format of one of the possibly-many input files is not a "setting" that the user has necessarily "chosen", nor is even necessarily aware of in the case of a tiff or png or miff for example that he did not create (or did not create recently). The user should not have to examine the internal coding scheme of a file he obtains, just in order to know how much of his *further* processing is going to be discarded by IM as a result of a choice made by someone else.
Also, by this logic, when the user reads in any kind of uncompressed data (e.g. MPC), IM should disable compression of all types of output file formats (or as uncompressed as possible), e.g. write an UNCOMPRESSED png for example. But again, the fact that I read in my data in some sort of raw format doesn't at all mean I want to save it to an uncompressed png file -- what is the benefit of that? Did the user read the file from an MPC file because he doesn't like png files to be compressed either? And by the perserve-the-setting principle, reading an uncompressed input format should mean that any jpeg output file should be written with a quality of at least 96 and no chroma subsampling, which is about as close as we can get to uncompressed in this format, since the principle would be to preserve the noncompression setting of (one of) the input file(s) as much as possible.
-Dabrosny [Using IM7.0.6 or higher, Q16 HDRI x64 native executable, command line, often invoked from cygwin bash/sh (as of Aug. 2017)]