Skip to content

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.

1 participant