Support single channel golden images.

PiperOrigin-RevId: 519158051
This commit is contained in:
MediaPipe Team 2023-03-24 09:04:53 -07:00 committed by Copybara-Service
parent c26965c842
commit 53e4e92505

View File

@ -214,7 +214,8 @@ absl::Status CompareAndSaveImageOutput(
const ImageFrameComparisonOptions& options) {
ASSIGN_OR_RETURN(auto output_img_path, SavePngTestOutput(actual, "output"));
auto expected = LoadTestImage(GetTestFilePath(golden_image_path));
auto expected =
LoadTestImage(GetTestFilePath(golden_image_path), ImageFormat::UNKNOWN);
if (!expected.ok()) {
return expected.status();
}