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

BMP 24bit or 32bit(i.e. with alpha) source doesn't work #2

Open
nbonniere opened this issue Jul 27, 2023 · 1 comment
Open

BMP 24bit or 32bit(i.e. with alpha) source doesn't work #2

nbonniere opened this issue Jul 27, 2023 · 1 comment

Comments

@nbonniere
Copy link

BMP source file format doesn't work, but after conversion of file from BMP to TGA, it works. BMP format is listed as supported, so why is it not supported ?

C:\Programs\Crunch2\bin>crunch -file 0101.bmp -fileformat dds -dxt3
crunch - Advanced DXTn Texture Compressor - https://github.com/FrozenStormInteractive/Crunch2

Copyright (c) 2010-2016 Richard Geldreich, Jr. and Binomial LLC
Copyright (c) 2020-2021 FrozenStorm Interactive, Yoann Potinet

crnlib version 1.2.0 x64 Built Jun 1 2021, 20:13:36

Reading source texture: "0101.bmp"
Error: Failed loading image file

Exit status: 1

C:\Programs\Crunch2\bin>crunch -file 0101.tga -fileformat dds -dxt3
crunch - Advanced DXTn Texture Compressor - https://github.com/FrozenStormInteractive/Crunch2

Copyright (c) 2010-2016 Richard Geldreich, Jr. and Binomial LLC
Copyright (c) 2020-2021 FrozenStorm Interactive, Yoann Potinet

crnlib version 1.2.0 x64 Built Jun 1 2021, 20:13:36

Reading source texture: "0101.tga"
Texture successfully loaded in 0.236s
Source texture: 4096x4096, Levels: 1, Faces: 1, Format: R8G8B8
Apparent type: 2D map, Flags: R G B Non-Flipped
Generating mipmaps using filter "kaiser"
Generated 12 mipmap levels in 3.310s
Converting texture format from R8G8B8 to DXT3
Processing: 100%
Texture format conversion took 12.150s
Writing texture to file: "0101.dds"

Texture successfully written in 12.185s
Texture successfully processed in 15.518s
Input texture: 4096x4096, Levels: 1, Faces: 1, Format: R8G8B8
Input pixels: 16777216, Input file size: 50331666, Input bits/pixel: 24.000
Output texture: 4096x4096, Levels: 13, Faces: 1, Format: DXT3
Output pixels: 22369621, Output file size: 22369776, Output bits/pixel: 8.000

Total time: 15.838s
1 total file(s) successfully processed, 0 file(s) skipped, 0 file(s) failed.

Exit status: 0

@nbonniere
Copy link
Author

A test with the original 'crunch' and the same bitmap works OK.

C:\Programs\Crunch2\bin>crunch_x64.exe -DXT3 -fileformat dds -file 0101.bmp
crunch: Advanced DXTn Texture Compressor - http://code.google.com/p/crunch
Copyright (c) 2010-2012 Rich Geldreich and Tenacious Software LLC
crnlib version v1.04 x64 Built Nov 19 2015, 17:45:31

Reading source texture: "0101.bmp"
Texture successfully loaded in 0.308s
Source texture: 4096x4096, Levels: 1, Faces: 1, Format: A8R8G8B8
Apparent type: 2D map, Flags: R G B A Non-Flipped
Generating mipmaps using filter "kaiser"
Generated 12 mipmap levels in 3.442s
Converting texture format from A8R8G8B8 to DXT3
Processing: 100%
Texture format conversion took 14.131s
Writing texture to file: "0101.dds"

Texture successfully written in 14.171s
Texture successfully processed in 17.646s
Input texture: 4096x4096, Levels: 1, Faces: 1, Format: A8R8G8B8
Input pixels: 16777216, Input file size: 50331702, Input bits/pixel: 24.000
Output texture: 4096x4096, Levels: 13, Faces: 1, Format: DXT3
Output pixels: 22369621, Output file size: 22369776, Output bits/pixel: 8.000

Total time: 18.107s
1 total file(s) successfully processed, 0 file(s) skipped, 0 file(s) failed.

Exit status: 0

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

No branches or pull requests

1 participant