test: fix encodeBmp equality checks#489
Conversation
|
@EscapedGibbon can you take this over and investigate why the tests are failing? I don't know if we need to fix the tests or the code. |
@targos the cause of this is in the way we encode bmp but i wouldn't call it a bug. As you can see there is a difference in some of the fields between the image from data(data at the top of image) and test image(data at the bottom of image). It happens because we usually store this data during bmp decoding and pass it to encoder. But, since image-js format doesn't store such specific data, encoder just fills it with default values. Default values were chosen with GIMP specs in mind, so if we overwrite images in GIMP the tests will pass
|
|
On the sidenote, I think it would be nice to include bmp decoder in image-js as well. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #489 +/- ##
=======================================
Coverage 98.66% 98.66%
=======================================
Files 246 246
Lines 10645 10645
Branches 2171 2171
=======================================
Hits 10503 10503
Misses 142 142 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Thanks! |


No description provided.