-
-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Better config * print to log * Upgrade golang.org/x/net * Tidy go mods * export WebpConfig * Add TestConvertRawToJPG * Add TestConvertRawToJPG * Update Integration Tests UA * Add README for supporting NEF --------- Co-authored-by: Benny <[email protected]>
- Loading branch information
1 parent
4a90b18
commit 543af24
Showing
8 changed files
with
115 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package encoder | ||
|
||
import ( | ||
"testing" | ||
) | ||
|
||
func TestConvertRawToJPG(t *testing.T) { | ||
testCases := []struct { | ||
rawPath string | ||
optimizedPath string | ||
expectedResult string | ||
expectedStatus bool | ||
}{ | ||
// blackbird.NEF is from https://github.com/jewright/nef-to-jpg/blob/main/photoconverter/Sample-Images/blackbird.NEF | ||
{"../pics/blackbird.NEF", "../exhaust_test/", "../exhaust_test/blackbird.NEF_extracted.jpg", true}, | ||
{"../pics/big.jpg", "../exhaust_test/", "../pics/big.jpg", false}, | ||
} | ||
|
||
for _, tc := range testCases { | ||
result, status := ConvertRawToJPG(tc.rawPath, tc.optimizedPath) | ||
|
||
if result != tc.expectedResult || status != tc.expectedStatus { | ||
t.Errorf("ConvertRawToJPG(%s, %s) => (%s, %t), expected (%s, %t)", tc.rawPath, tc.optimizedPath, result, status, tc.expectedResult, tc.expectedStatus) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.