문제

I am using JAI to read/write multi-page TIFFs containing different type of images (different sizes, different compression methods) and I have to read the file, change a few values in the TIFF headers of the pages and write these headers back without changing image content/compression.

Though I am able to read all pages and headers, modify the headers and re-write the whole TIFF, I am concerned about the time needed for recompression, especially when the "main" image is already JPEG-compressed, multiple read/write would loose more and more data.

I already thought about two things:

  1. Write specific header content to mark positions in file and hack into it to change
  2. Write a JNI wrapper on top of C libtiff (but I would rather not)

If possible, I would prefer to do it all with JAI.

도움이 되었습니까?

해결책

I couldn't find any proper way of doing that, except manually reading the file, rewriting image data as read and patching through the TIFF fields positions/offsets ...

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top