Skip to content

Commit

Permalink
Merge branch 'master' into AJC-master
Browse files Browse the repository at this point in the history
  • Loading branch information
acolwell committed May 24, 2024
2 parents e65248e + c05d785 commit ede560c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions OIIO/WriteOIIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1015,8 +1015,16 @@ WriteOIIOPlugin::beginEncodeParts(void* user_data,
string compression;

switch ((EParamCompression)compression_i) {
case eParamCompressionAuto:
break;
case eParamCompressionAuto: {
// Set compression string for formats that only have a single compression type.
static const char* formats[] = {"jpeg", "webp", "heic", "avif", nullptr};
for (int i = 0; formats[i] != nullptr; ++i) {
if (strcmp(data->output->format_name(), formats[i]) == 0) {
compression = formats[i];
break;
}
}
} break;
case eParamCompressionNone: // EXR, TIFF, IFF
compression = "none";
break;
Expand Down

0 comments on commit ede560c

Please sign in to comment.