Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for flip row order BMP #77

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Tsuk1ko
Copy link

@Tsuk1ko Tsuk1ko commented Mar 24, 2023

Refer to image-size/image-size#89

A BMP with flip row order can be made by Photoshop:

image


One more thing I found these two functions were named incorrectly:

exports.readUInt32LE = function (data, offset) {
return data[offset] |
(data[offset + 1] << 8) |
(data[offset + 2] << 16) |
(data[offset + 3] * 0x1000000);
};
exports.readUInt32BE = function (data, offset) {
return data[offset + 3] |
(data[offset + 2] << 8) |
(data[offset + 1] << 16) |
(data[offset] * 0x1000000);
};

They actually read signed integers, not unsigned integers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant