It must've been around the 500th time or so, of converting various BLP files back and forth, when I thought..
Why all this converting nonsense? Why can't I just load up BLP files right into Photoshop, edit them, and save them back to BLP? And then I remembered - because there's no Photoshop plugin for that format.
So I figured I'd try to change that, and I have.
Mac OS X
1. Find your Photoshop Folder
a. eg1: (x64) C:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)\
b. eg2: (32-bit) C:\Program Files\Adobe\Adobe Photoshop CS6\
2. From that folder, go to \Plug-ins\File Formats\
3. Drop the appropriate plugin (x64 or x86) in that folder.
4. Run Photoshop
It was my goal to support every variant of the BLP format that Blizzard uses in WoW - for both opening and saving. The end result is a total of 11 different combinations of compression and transparency. Below is a listing of these.
Alpha Bit Depths
This is the amount of detail allowed in transparency of your image.
0-bit - No transparency at all
1-bit - simple transparency, similar to GIFs. It's either transparent or not.
4-bit - slightly better range of transparency, but will turn smooth fades into visible "steps"
8-bit - This is the same level of transparency you'll ordinarily see in PNG/TGA formats, with 256 levels of transparency.
Indexed (256 Color) - Very similar to a GIF, as it uses a palette that can fit up to 256 colors, but BLP files have indipendent transparency. Indexed BLPs can make use of all 4 types of alpha.
DXT - This is the defacto compression type used in modern games, with the most popular format that uses this, being .dds. DXT compression gives you a better color range, with a slightly larger size, than indexed. It also supports all 4 levels of transparency.
DXT-5 - Would normally be lumped in with the above category, however it's the second DXT type that supports 8-bit alpha. The result is a bit better color, and a slightly larger file size than the 8-bit alpha under the DXT category.
Uncompressed - Very much like a Bitmap, with no compression to speak of. It can support either 0-bit or 8-bit alpha. This version is only used by Blizzard for sky textures, where every bit of color detail is necessary.
Caveats and Limitations
This is currently a Beta release - there are a couple of known limitations that I hope to fix soon
The plugin will not save if your image is "flattened" (i.e. the locked "Background" layer). This is due to the fact that it handles that Background differently than normal layers, and until I find a way around it, it will only save those normal layers. So if you have no layers, it will give you an error - if you have layers, it will only save the layers, and not the Background.
Questions, Comments, and Other Feedback
Please comment below, especially if you find a bug not already mentioned above. Whether that be a problem loading a WoW BLP file, or saving your own, let me know. If it's a WoW file, let me know the name, and if it's one of your own - I would appreciate linking me (either in the comments or PM) the original image you're trying to convert. If you don't feel comfortable with sending me a PSD file, that's ok too, but whatever the problem is, might get lost in the conversion.
Mac Users, You are not ignored!
I did say "Coming Soon" above, and I do mean it. You'll just have to be a little patient, because I've never used XCode before. So, depending on how quickly I can pick up on it, depends on how quickly there will be a Mac version. The good news is, that the vast majority of the plugin's code - is platform independent. The (potential) bad news is, that I'm only going to support Intel Macs - because Power PC Macs would require significant code changes.
Fixed an issue that was preventing saved BLP files from appearing in game
Plugin will now throw an error if you attempt to save an image, with dimensions that are not a power of 2