BIF started off as a humble single-threaded Visual Basic application. It quickly became the most popular image format in the world, with over 10 users by the end of 2021. However, due to a catastrophic SSD failure, all the source code for BIF was lost. There was little hope for this amazing format... until now.
BIF.py is a complete rewrite of the BIF format, written in Python (in case you couldn't tell). It contains all the fantastic features of the original BIF format.
For the uninitiated, BIF includes various colour modes that allow for the greatest results, and a special-in-more-ways-than-one lossless compression algorithm called the Bloated Compression Algorithm. The BCA is unique in that it can actually bloat the file instead of compressing it, so it's best used for images with solid chunks of colour. Either way, the file size is probably smaller than PNG anyway, because it's a worse format.
BIF aims to be a personal format, because you can select the perfect colour mode for the image in question, and even Pre-Bright it before conversion for the optimum contrast. The results are supremely eye-catching, and stick out amongst other image formats.
BIF.py picks up where BIF left off, adding 2 new colour modes: Mode 4 (8 step greyscale), and Mode 5 (a combination of Mode 1 and 2). It also contains a completely rewritten GUI done in TkInter (pronounced: takinter), for full hands-on operation. |
![]() |
![]() |
It offers a significant and completely unexpected speed increase over the original version. Converting a 1920x1080 image in the original version takes 16 seconds. Converting the same 1920x1080 image in BIF.py takes just 6 seconds! This is roughly a 166% speed increase, a massive improvement over the original converter. |
The BIF.py package comes with numerous command line Python applications, as well as the GUI, which is arguably the main attraction. The command line applications are if you want complete control over every single parameter, or want to perform batch conversions. A simple viewing application is also included.
![]() |
BIF.py manages to pull off something previously attempted, but couldn't be done because the way Visual Basic deals with modules is utterly ridiculous. The entire BIF format, alongside the BCA, is now contained in a single module, which can be imported in all your Python projects! The library includes the ability to convert a regular image to BIF, or convert a BIF back to an inferior format (such as PNG). It also includes a standalone implementation of the BCA, which is used in all conversion functions, and is greatly optimized over the original version. |
Click the link below to download the library, alongside some bonus files to get you started! It absolutely relies on the Pillow library, so make sure to "pip install Pillow" before using. It also uses argparse for the command line applications, and TkInter for the GUI.
This was developed in Python 3.10, so compatibility with earlier versions is unknown. I know for a fact that it won't work with Python 2, that's for sure!
Copyright 2021-2022 Presley Peters (Prezzo). BIF Python Edition logo by Spoon. Most rights reserved, I hope. If not, get me in touch with some lawyers or something.