boostorg / boostorg/gil

TIFF I/O asserts with empty image

未關閉
#224 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
ext/io
主要語言
C++
星號
199
分支
171
平均合併
1 天 14 小時
30 天內合併 PR
10

描述

### Minimal Working Example (in C++)

```cpp
/* whatever image type*/ image(); //empty image
tiff_write_view("test.tif", image);
```

### Actual behavior

Assert: `front() called on empty vector` reported by MSVC in Debug
In file `boost\gil\extension\io\tiff\detail\write.hpp`.

### Expected behavior

Parameter checking should be done upfront, maybe in `write_view()`.

### Notes

This might apply to other I/O extensions.

Also, could you fix the indentation in the I/O extension files (mix of tabs / space)? Or are you planning on generalizing the use of `clang-format` in the future?

TBH, I am a bit puzzled with the new I/O framework (I have extensions written the old way). Looking at the TIFF format for instance:

Old: 29 KB in two files
New: 114 KB in 13 files

What are the new functionalities that require such a large number of additional code? Furthermore the documentation in "Extending GIL::IO with new Formats" makes it sound like it's an easy job :-)

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。