diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-08-11 16:37:57 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-08-11 16:37:57 +0200 |
| commit | ddeecdac0600a3fe72660fb1e14b652c59f09d33 (patch) | |
| tree | 045dedc3bc84960ecbe86e1336af61e1caea8a20 | |
| parent | 7abb914a871af91422a542e405d37c30bfa199f7 (diff) | |
Cleanup: remove duplicated code.
| -rw-r--r-- | test/test.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/test/test.cc b/test/test.cc index fd9c6941b..a761eb520 100644 --- a/test/test.cc +++ b/test/test.cc @@ -715,15 +715,13 @@ png_error_fn (png_structp, char const * message) void write_image (shared_ptr<const Image> image, boost::filesystem::path file) { - int png_color_type = 0; + int png_color_type = PNG_COLOR_TYPE_RGB; int bits_per_pixel = 0; switch (image->pixel_format()) { case AV_PIX_FMT_RGB24: - png_color_type = PNG_COLOR_TYPE_RGB; bits_per_pixel = 8; break; case AV_PIX_FMT_XYZ12LE: - png_color_type = PNG_COLOR_TYPE_RGB; bits_per_pixel = 16; break; default: |
