boostorg / boostorg/gil

TIFF I/O asserts with empty image

Offen
#224 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
ext/io
Vorherrschende Sprache
C++
Sterne
199
Forks
171
Ø Merge
1 T. 14 Std.
Gemergte PRs (30 T.)
10

Beschreibung

### 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 :-)

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.