cvSaveImage and imwite set resolution and key/value pairs

asked 2013-07-06 15:18:25 -0500

I would like to add resolution as options for cvSaveImage and imwrite. The code for TIFF is trivial, but I see that somebody else did the same thing a couple of years ago (Ticket #1080: libtiff_save.patch) and that patch did not make version 2.4.5. So why did that patch get rejected? My code is different in that it does not set default values and only writes the resolution tags if they are passed as parameters. I also plan on adding the same functionality to PNG, BMP and JPEG. I do not want to submit the patches if the powers that be do not want to add resolution.

I also would like to add “key/value” data to PNG, TIFF and JPEG. Would that be of general interest or should I just patch my copies of the code?

How to read the values back from the image files creates a problem. imread does not have a way to pass the parameters back to the program, which means a new function or two. Anybody have suggestions for the prototypes for the read resolution and read key/value data functions?

Thanks, Charles

edit retag flag offensive close merge delete