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

Every single image I recompress ends up being exactly 20 bytes too large #28

Open
Niedzwiedzw opened this issue Jan 2, 2025 · 1 comment

Comments

@Niedzwiedzw
Copy link

example from logs: (sorry if I pasted too much)

reason:size mismatch (expected [174904 bytes], found [174924 bytes])
reason:size mismatch (expected [174904 bytes], found [174924 bytes])
reason:size mismatch (expected [349680 bytes], found [349700 bytes])
reason:size mismatch (expected [174904 bytes], found [174924 bytes])
reason:size mismatch (expected [174904 bytes], found [174924 bytes])
reason:size mismatch (expected [174904 bytes], found [174924 bytes])
reason:size mismatch (expected [174904 bytes], found [174924 bytes])
reason:size mismatch (expected [87536 bytes], found [87556 bytes])
reason:size mismatch (expected [174904 bytes], found [174924 bytes])
reason:size mismatch (expected [174904 bytes], found [174924 bytes])
reason:size mismatch (expected [349680 bytes], found [349700 bytes])
reason:size mismatch (expected [1398256 bytes], found [1398276 bytes])
reason:size mismatch (expected [349680 bytes], found [349700 bytes])
reason:size mismatch (expected [1398256 bytes], found [1398276 bytes])
reason:size mismatch (expected [349680 bytes], found [349700 bytes])
reason:size mismatch (expected [174904 bytes], found [174924 bytes])
reason:size mismatch (expected [65660 bytes], found [65680 bytes])
reason:size mismatch (expected [65660 bytes], found [65680 bytes])
reason:size mismatch (expected [5592552 bytes], found [5592572 bytes])
reason:size mismatch (expected [11184976 bytes], found [11184996 bytes])
reason:size mismatch (expected [2796368 bytes], found [2796388 bytes])
reason:size mismatch (expected [5592552 bytes], found [5592572 bytes])
reason:size mismatch (expected [1398248 bytes], found [1398268 bytes])
reason:size mismatch (expected [1398248 bytes], found [1398268 bytes])
reason:size mismatch (expected [1398248 bytes], found [1398268 bytes])
reason:size mismatch (expected [2796368 bytes], found [2796388 bytes])
reason:size mismatch (expected [5592552 bytes], found [5592572 bytes])
reason:size mismatch (expected [1398248 bytes], found [1398268 bytes])
reason:size mismatch (expected [1398248 bytes], found [1398268 bytes])
reason:size mismatch (expected [1398248 bytes], found [1398268 bytes])
reason:size mismatch (expected [2796368 bytes], found [2796388 bytes])
reason:size mismatch (expected [2796368 bytes], found [2796388 bytes])
reason:size mismatch (expected [1398256 bytes], found [1398276 bytes])
reason:size mismatch (expected [1957088 bytes], found [1957108 bytes])
reason:size mismatch (expected [2025944 bytes], found [2025964 bytes])
reason:size mismatch (expected [2025944 bytes], found [2025964 bytes])
reason:size mismatch (expected [3566432 bytes], found [3566452 bytes])
reason:size mismatch (expected [3008556 bytes], found [3008576 bytes])
reason:size mismatch (expected [2427100 bytes], found [2427120 bytes])
reason:size mismatch (expected [1957088 bytes], found [1957108 bytes])
reason:size mismatch (expected [4009700 bytes], found [4009720 bytes])
reason:size mismatch (expected [2343784 bytes], found [2343804 bytes])
reason:size mismatch (expected [2796344 bytes], found [2796364 bytes])
reason:size mismatch (expected [1398248 bytes], found [1398268 bytes])
reason:size mismatch (expected [2796344 bytes], found [2796364 bytes])
reason:size mismatch (expected [1398248 bytes], found [1398268 bytes])
reason:size mismatch (expected [1398248 bytes], found [1398268 bytes])
reason:size mismatch (expected [2796344 bytes], found [2796364 bytes])
reason:size mismatch (expected [2796344 bytes], found [2796364 bytes])
reason:size mismatch (expected [2796344 bytes], found [2796364 bytes])
reason:size mismatch (expected [2796344 bytes], found [2796364 bytes])
reason:size mismatch (expected [2796344 bytes], found [2796364 bytes])
reason:size mismatch (expected [2796344 bytes], found [2796364 bytes])
reason:size mismatch (expected [2796344 bytes], found [2796364 bytes])
reason:size mismatch (expected [2796344 bytes], found [2796364 bytes])
reason:size mismatch (expected [2796344 bytes], found [2796364 bytes])
reason:size mismatch (expected [2796344 bytes], found [2796364 bytes])

this actually makes it too big to fit into the bethesda archive, so I wonder what could be the reason for this

here's entire code: https://github.com/Niedzwiedzw/hoolamike/blob/269f555e8707fdbd29e1d57b60ef3e3cc78f38c8/crates/hoolamike/src/install_modlist/directives/transformed_texture/dds_recompression.rs#L8

so idk, just to throw some ideas, maybe an extra very small mipmap is getting generated?

@ScanMountGoat
Copy link
Owner

You would need to look at the dimensions, mip maps, etc for the textures that have that issue. I don't expect this to be an issue with image_dds itself.

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

No branches or pull requests

2 participants