• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

BLP.NET CL

This bundle is marked as pending. It has not been reviewed by a staff member yet.
BLP.NET CL is a command-line tool where you can encode and decode BLP (Blizzard images) into various image codecs.

This is a superset of Shadow Daemon's BLP Laboratory CL. If you attempt to encode a BLP image with BLP.NET CL, it will unpack the "blplabcl.exe" and "swdn_blp.dll" files in its current directory and use it for BLP encoding.

This tool is inspired of ffmpeg, and again blplabcl.

If you are creative enough, you can do big things with this tool.

Features

- Can encode and decode BLP images to various image codecs: BMP, GIF, JPG, PNG, WEBP, TGA and DDS.
- Can only decode the following image codecs: ICO, WBMP, DNG
- Can add or remove alpha channels when converting back into BLP.
- Since this is a superset of BLP Laboratory CL, you can set the BLP Type (Compressed or Paletted), set mipmaps, set the quality, and have the option flags (Merge headers, Compress palette, Progressive encoding, and Error diffusion).
- Assorted commands in the command-line tool that provide useful information.
- Paint.NET BLP file type plugin that relies on BLP.NET CL.

Limitations

- The current BLP decoder cannot support BLP0.
- During my tests, the TGA decoder can fail when loading a TGA image coming from BLP Laboratory (GUI).

Image codecDecoderEncoder
BLP✅ War3Net.Drawing.Blp 5.6.1✅ BLP Laboratory CL
TGA✅ Gorgon.Graphics.Imaging 3.2.30.304✅ Gorgon.Graphics.Imaging 3.2.30.304
DDS✅ Gorgon.Graphics.Imaging 3.2.30.304✅ Gorgon.Graphics.Imaging 3.2.30.304
BMP✅ SkiaSharp 2.88.8✅ Gorgon.Graphics.Imaging 3.2.30.304
GIF✅ SkiaSharp 2.88.8✅ Gorgon.Graphics.Imaging 3.2.30.304
JPG✅ SkiaSharp 2.88.8✅ SkiaSharp 2.88.8
PNG✅ SkiaSharp 2.88.8✅ SkiaSharp 2.88.8
WEBP✅ SkiaSharp 2.88.8✅ SkiaSharp 2.88.8
ICO✅ SkiaSharp 2.88.8❌ Not supported
WBMP✅ SkiaSharp 2.88.8❌ Not supported
DNG✅ SkiaSharp 2.88.8❌ Not supported

279226-e2cc949ce38cfbb12687ef1db7a410d1.png


Just run Install_BlpDotNet.bat with Run on Administrator, and you will have this in your Paint.NET too. (Choo choo girl not included)



Future Plans

- Github repository so others can contribute.
- A command where you can use pipes to input and output image binaries instead of File IO.
- Output options for other image codecs.

Motivation

I am working on a map where I'm automating the version labelling of the whole map. This includes the war3mapPreview.tga and the loading screen where it indicates the map version. It reached to the point I am using 3 different command-line tools to deal with the image conversions and I noticed most of them had issues with encoding and decoding images. Most solutions I found in Hive uses graphical user interface (GUI) and have zero command-line features. I had enough and introduce a solution to my problem: BLP.NET CL. Also, I'm a Paint.NET user and it is frustrating BLP file type plugins does not work in the modern versions. Good thing making this hit two birds with one stone.

Now get ready to type blpnetcl, or let your automation tools do the blpnetcl for you.
Choo choo!



0.1.1
- blpnetcl.exe will now unpack 'libSkiaSharp.dll' file to fix the dependency issue for other computers

0.1.0
- First version

BLP.NET CL
Copyright (c) 2024 Glint
License is MIT

BLP.NET is made with C#. The target framework of this project is .NET 8.0.
Image encoders and decoders used War3Net.Drawing.Blp, BLP Laboratory CL, SkiaSharp, and Gorgon.
It pains with my heart, this is a Windows only command-line tool unless it works on WINE.

If people are interested in this tool, I will try to upload the project in Github.
Previews
Contents

BLP.NET CL (Binary)

Top