-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Read Short as u16, SignedShort as i16 #235
base: master
Are you sure you want to change the base?
Conversation
For values expected to be u16.
Adapted from image-rs@84ff679
The hard part is still this concern:
|
A |
Cargo semver-checks doesn't capture behavior changes. If there's downstream code that assumes (perhaps via |
Ok, what would you recommend then to mitigate against downstream breakages? Would a minor version bump to v0.10.0 (with a changelog entry that mentions this breaking change) not suffice? |
Previously, Short values were read incorrectly as
u32
instead ofu16
, and SignedShort values were read incorrectly asi32
instead ofi16
.This PR does the following:
TiffFormatError::ShortExpected
enum variantType::SHORT
as u16 values, and support casting Short to other unsigned types via theinto_u32_vec
andinto_u64_vec
methods.Type::SSHORT
as i16 valuesFixes #204