|
diff --git a/LICENSE b/LICENSE
|
|
|
1 |
BSD 2-Clause License |
|
|
2 |
|
|
|
3 |
Copyright (c) 2025, Mitja Felicijan <mitja.felicijan@gmail.com> |
|
|
4 |
|
|
|
5 |
Redistribution and use in source and binary forms, with or without |
|
|
6 |
modification, are permitted provided that the following conditions are met: |
|
|
7 |
|
|
|
8 |
1. Redistributions of source code must retain the above copyright notice, this |
|
|
9 |
list of conditions and the following disclaimer. |
|
|
10 |
|
|
|
11 |
2. Redistributions in binary form must reproduce the above copyright notice, |
|
|
12 |
this list of conditions and the following disclaimer in the documentation |
|
|
13 |
and/or other materials provided with the distribution. |
|
|
14 |
|
|
|
15 |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
|
|
16 |
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
|
|
17 |
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
|
|
18 |
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
|
|
19 |
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
|
|
20 |
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
|
|
21 |
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
|
|
22 |
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
|
|
23 |
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
|
|
24 |
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
diff --git a/README.md b/README.md
|
|
|
1 |
# Converts BLP to PNG |
|
|
2 |
|
|
|
3 |
This tool converts images in BLP texture file format used in many games such as |
|
|
4 |
World of Warcraft into PNG files. |
|
|
5 |
|
|
|
6 |
It works with DXT1, DXT3 and DXT5 compressions so it should convert anything |
|
|
7 |
from WoW. |
|
|
8 |
|
|
|
9 |
It should work on all operating systems. There is no funky code in this |
|
|
10 |
repository or or any dependencies you need to have installed on your machine. C |
|
|
11 |
compiler and Libc is all you need. |
|
|
12 |
|
|
|
13 |
## Compile & Use |
|
|
14 |
|
|
|
15 |
```sh |
|
|
16 |
make -B |
|
|
17 |
``` |
|
|
18 |
|
|
|
19 |
This will create `blpconvert` binary. Check available options with |
|
|
20 |
`./blpconvert -h`. |
|
|
21 |
|
|
|
22 |
Basic example of usage is `./blpconvert samples/Ability_Ambush.blp`. |
|
|
23 |
|
|
|
24 |
You can provide multiple input files or you can also use Bash expansion when |
|
|
25 |
providing files to the tool. |
|
|
26 |
|
|
|
27 |
```sh |
|
|
28 |
./blpconvert samples/*.blp |
|
|
29 |
``` |
|
|
30 |
|
|
|
31 |
## Verbose output |
|
|
32 |
|
|
|
33 |
If you provide `-v` flag the program will output a bunch of diagnostical data. |
|
|
34 |
|
|
|
35 |
```sh |
|
|
36 |
$ ./blpconvert samples/Ability_Ambush.blp -v |
|
|
37 |
Processing File: |
|
|
38 |
Fullname: samples/Ability_Ambush.blp |
|
|
39 |
Folder: samples |
|
|
40 |
Filename: Ability_Ambush |
|
|
41 |
Extension: .blp |
|
|
42 |
BLP File Details: |
|
|
43 |
Type: 1, BLP/DXTC/Uncompressed |
|
|
44 |
Compression: 2, DXTC |
|
|
45 |
Alpha Depth: 8 |
|
|
46 |
Alpha Type: 1 |
|
|
47 |
Has Mipmaps: 17 |
|
|
48 |
Width: 64, Height: 64 |
|
|
49 |
Reading image data at offset 1172, size 4096 bytes |
|
|
50 |
BLP is compressed with DXTC. |
|
|
51 |
Image has 4096 bytes. |
|
|
52 |
Saving decoded image as PNG... |
|
|
53 |
Successfully saved samples/Ability_Ambush.png |
|
|
54 |
|
|
|
55 |
First few pixels of decoded image (RGBA format): |
|
|
56 |
( 0, 0, 0, 0) ( 0, 0, 0, 0) ( 0, 0, 0, 0) ( 0, 0, 0, 0) |
|
|
57 |
( 0, 0, 0, 0) ( 0, 0, 0, 0) ( 0, 0, 0, 0) ( 0, 0, 0, 0) |
|
|
58 |
( 0, 0, 0, 0) ( 0, 0, 0, 0) ( 0, 0, 0, 51) (184,200,200,221) |
|
|
59 |
( 0, 0, 0, 0) ( 0, 0, 0, 0) (184,200,200,221) (184,200,200,255) |
|
|
60 |
``` |
|
|
61 |
|
|
|
62 |
## Reading material |
|
|
63 |
|
|
|
64 |
- https://wowwiki-archive.fandom.com/wiki/BLP_file |
|
|
65 |
- https://en.wikipedia.org/wiki/S3_Texture_Compression |
|
|
66 |
|
|
|
67 |
## License |
|
|
68 |
|
|
|
69 |
[blpconvert](https://github.com/mitjafelicijan/blpconvert) was written by [Mitja |
|
|
70 |
Felicijan](https://mitjafelicijan.com) and is released under the BSD |
|
|
71 |
two-clause license, see the LICENSE file for more information. |