You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Switched the image patch to my own fork to add the Wbmp & Otb formats to the image::ImageFormat enum so the hooks would register. Not exactly sure the best course of action to add the formats - whether to open a PR for the formats now, wait for the decoding-hooks branch to be merged, etc. guidance appreciated 😃
Note that OTA Bitmap Wikipedia article differs from ImageMagick implementation for the format (ImageMagick splits rows at bytes - padding with 0s, while Wikipedia explicitly claims this is not the case). (OTA Bitmap Wiki, ImageMagick implementation)
I have gone with an implementation consistent with ImageMagick, but the implementation consistent with the Wikipedia is easier, so if there is any evidence that the latter is valid I would be happy to switch it back.
I had some trouble finding otb / wbmp images with explicit licenses, so I drew the test images which is why there is no source listed for them.
Not exactly sure the best course of action to add the formats - whether to open a PR for the formats now, wait for the decoding-hooks branch to be merged, etc. guidance appreciated 😃
The main image crate has recently had a release (0.25.8) adding a decoding hooks API.
I have gone with an implementation consistent with ImageMagick, but the implementation consistent with the Wikipedia is easier, so if there is any evidence that the latter is valid I would be happy to switch it back.
In order to fully utilise the available bandwidth no filler bits are used in the end of the row; fillers are put at the end of the whole bitmap if the size of the bitmap is not divisible by eight. Filler bits assume a value of zero.
Also, WBMP and OTB look like they are quite rare formats nowadays; if you don't mind me asking, what are you decoding and encoding them for?
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to Issue #1
Switched the image patch to my own fork to add the Wbmp & Otb formats to the
image::ImageFormatenum so the hooks would register. Not exactly sure the best course of action to add the formats - whether to open a PR for the formats now, wait for the decoding-hooks branch to be merged, etc. guidance appreciated 😃Note that OTA Bitmap Wikipedia article differs from ImageMagick implementation for the format (ImageMagick splits rows at bytes - padding with 0s, while Wikipedia explicitly claims this is not the case). (OTA Bitmap Wiki, ImageMagick implementation)
I have gone with an implementation consistent with ImageMagick, but the implementation consistent with the Wikipedia is easier, so if there is any evidence that the latter is valid I would be happy to switch it back.
I had some trouble finding otb / wbmp images with explicit licenses, so I drew the test images which is why there is no source listed for them.