You realize that StormLib uses pkware by default as I found it in the source code?
StormLib is maintained by Russians so they do not care?
I'd like to contact the author and ask for permission directly.
What good would that be? He does not own PKWARE compression intellectual property. The PKWARE compression algorithm is owned by
PKWARE Incoperated who are the only people who can legally sell/distribute licences to use the PKWARE compression. Blizzard paid/pays them in order to use it, hence why their new games no longer use PKWARE compression.
It is almost certainly illegal in the USA and Europe to use PKWARE compression on data without a licence from PKWARE Incorporated, even if your implementation is open source.
Are you sure not every chain can be used?
Only in version 2/3 MP files is not every combination permitted. Although it retains its flag based layout mostly, only certain combinations are valid. This was to add some form of sense to the compression used since chaining every compression is pointless functionality.
What color space conversion are you talking about? I thought about the binary representation which is RGBA or which I did read somewhere.
A color space cannot be RGBA because alpha is not a colour. Alpha is metadata to help process a colour. In real life nothing has an "alpha" colour.
BLP textures are in a linear RGB colour space. Alpha is always linear as it is computational metadata so can be ignored (you never see alpha, only its affects). Your display is in a
non-linear RGB colour space. In a BLP texture a component value of 128 is twice as bright as a component value of 64. In your display space a component value of 128 is ~4.59 times as bright as a component value of 64.
Does this make a difference? Yes it does because if you do not interpret the image correctly the colours will be wrong due to the RGB components having a completely different mix. A good example would be the mipmaps would look wrong as the averaging used would be biased towards dark colours.
Why is your display non-linear? Because your eyes are non-linear (like most natural sensors) and so it gives much better dynamic range for the bandwidth used. In a non-linear colour space with 8 bits per channel a 255 value channel is 255 times as bright as a 1 value channel. In the 2.2 gamma display space with 8 bit per colour channel, which most display manufacturers approximate, a 255 value channel is 196,965 times as bright as a 1 value channel. This means BLP files actually have very bad colour range when it comes to dark colours (cannot represent any dark details).
How do I know this is right? I looked at the OpenGL API calls WC3 makes and what textures it loads into memory when in OpenGL mode. All textures correspond to their BLP pixel values meaning no correction is performed. All textures are loaded as linear RGB textures both due to observation of the API calls made and the logical reasoning of them only being able to be loaded as linear RGB textures. When WC3 was made the sRGB texture format, which performs automatic correction, did not exist.
WC3 also lacks a colourizer/HDR stage as it uses the legacy fixed shader pipelines. As such a gamma of 2.2 (setting 44) is needed so that the output matches approximately your display response. Modern games like SC2, HotS and Diablo III have their gamma correction built into the colourizer/HDR shader stage so that the in game gamma is more a further correction for displays that do not follow a 2.2 curve (eg MAC displays with 1.9).
Anyway the BLP display works perfectly.
What evidence do you have for this?
About the colors, it's just some fetish he has, that's not relevant to anything, but he keeps posting it in every thread that has the word blp in it.
It is because people are ignorant to the facts about how displays work. Its like they did not bother spending 5 minutes to read the professional documentation about the subject.