IMAGE(.jpg, .png, etc) to BMX file convertor.
Posted: Thu Dec 07, 2023 10:13 pm
Here's a utility to convert standard Image formats to the X16 BMX image file format.
Requires imagemagick to be installed. There is a link to ImageMagick for Windows at the end of this post.
23 MAY 2024
Fixed Padding errors with Image files where width not evenly divisible by 4.
Now also recognizes file names with spaces properly.
Ok 3 updates in 12 hours and nobody downloaded it..lol.
I'm now considering this a fairly MAJOR UPDATE.
In addition to the bug fixes there are now 2 new features
User chooses how many colors to use in the conversion.
Valid values are 17 to 256.
(If I use 16 imagemagick steps in and makes a 4bpp image which I can't use)
If Num Colors < 250 all these colors are shifted to the End of the Palette.
Pixel values from Indx 0 to 1 less than image pixel start
will use VERA default values.
Default value is 240 which leaves the Text Palette as VERA Default.
There is now an option to also Output a VERA BIN and PAL file as well as the BMX
so this now replaces my img2bvload program and gives it the same palette shifting feature.
Recommend you use this from the command line so you know what resolution is being
output. BIN files < 320 width require some manipulation to be used effectively,
Starting with you need to know the resolution. It is output on the console when using img2bmx
from the command line. (It will also be stored in the BMX Header if you miss the output).
HERES THE UPDATED CONVERTOR 05-23-2024
04-18-2024 MAJOR UPDATE
img2bmx now makes sure that the BMX image will not use the VERA Text Palette Indices. This limits them to 240 colors but makes it much easier to use them in a program. You can use the Text Colors without scrambling the colors on the Image. You can also fade out the Image colors to black without fading out the Text on Screen. I've combined the source and the Windows and Linux versions in one archive this time. The MAC build is not yet updated. I'll need the aid of someone to build it for me that has a MAC.
(current MACOS build IS NOT up to date, it does not have the feature of reserving the text colors yet
or the Image.Width fix) and still has the bug with filenames with spaces
MACOS BUILD (courtesy of AndreasEK)
TEXT FROM THE README FILE.
The BMX Convertor is written and compiled in QB64 Phoenix Edition. This has several unique features from the Standard QB64 release and this program makes use of some of them. QB64 Phoenix Edition -------------------- https://qb64phoenix.com 1. Preserves Aspect Ratio of converted files 2. Resizes only if necessary (files that fit in 320 x 240 are not resized) 3. Operates as a Hybrid command line/GUI app. If a command line argument is given then that file is converted. Multiple files can be passed on the command line. (including *.jpg *.png, etc.) 4. If no command line argument then you get a file dialog to select the file(s) to convert. 5. Works on GIF, BMP, PNG, JPG, AIFF, TIFF and WEBP (Probably others) If ImageMagick supports the format my convertor will probably work on it. Only the listed extensions will be in the Dialog but you can switch to all files if you want to try a different format. 6. WINDOWS EXECUTABLE IS NOW ONLINE. The DEFINES I put in the source worked perfectly. 7. MACOS Build added courtesy of AndreasEK.
When I wrote my previous BVLOAD convertor I had problems under Windows with certain
ImageMagick versions that used 16 bits per color channel. I did include a link on there
before but the ImageMagick people have broken my link twice now.
The ImageMagick License allows redistribution with attribution. This belongs
to ImageMagick Studio. LLC.
License link here: https://imagemagick.org/script/license.php
I'm including here the 8 bit per color channel version for Windows that works correctly with
both of my convertors.
Requires imagemagick to be installed. There is a link to ImageMagick for Windows at the end of this post.
23 MAY 2024
Fixed Padding errors with Image files where width not evenly divisible by 4.
Now also recognizes file names with spaces properly.
Ok 3 updates in 12 hours and nobody downloaded it..lol.
I'm now considering this a fairly MAJOR UPDATE.
In addition to the bug fixes there are now 2 new features
User chooses how many colors to use in the conversion.
Valid values are 17 to 256.
(If I use 16 imagemagick steps in and makes a 4bpp image which I can't use)
If Num Colors < 250 all these colors are shifted to the End of the Palette.
Pixel values from Indx 0 to 1 less than image pixel start
will use VERA default values.
Default value is 240 which leaves the Text Palette as VERA Default.
There is now an option to also Output a VERA BIN and PAL file as well as the BMX
so this now replaces my img2bvload program and gives it the same palette shifting feature.
Recommend you use this from the command line so you know what resolution is being
output. BIN files < 320 width require some manipulation to be used effectively,
Starting with you need to know the resolution. It is output on the console when using img2bmx
from the command line. (It will also be stored in the BMX Header if you miss the output).
HERES THE UPDATED CONVERTOR 05-23-2024
04-18-2024 MAJOR UPDATE
img2bmx now makes sure that the BMX image will not use the VERA Text Palette Indices. This limits them to 240 colors but makes it much easier to use them in a program. You can use the Text Colors without scrambling the colors on the Image. You can also fade out the Image colors to black without fading out the Text on Screen. I've combined the source and the Windows and Linux versions in one archive this time. The MAC build is not yet updated. I'll need the aid of someone to build it for me that has a MAC.
(current MACOS build IS NOT up to date, it does not have the feature of reserving the text colors yet
or the Image.Width fix) and still has the bug with filenames with spaces
MACOS BUILD (courtesy of AndreasEK)
TEXT FROM THE README FILE.
The BMX Convertor is written and compiled in QB64 Phoenix Edition. This has several unique features from the Standard QB64 release and this program makes use of some of them. QB64 Phoenix Edition -------------------- https://qb64phoenix.com 1. Preserves Aspect Ratio of converted files 2. Resizes only if necessary (files that fit in 320 x 240 are not resized) 3. Operates as a Hybrid command line/GUI app. If a command line argument is given then that file is converted. Multiple files can be passed on the command line. (including *.jpg *.png, etc.) 4. If no command line argument then you get a file dialog to select the file(s) to convert. 5. Works on GIF, BMP, PNG, JPG, AIFF, TIFF and WEBP (Probably others) If ImageMagick supports the format my convertor will probably work on it. Only the listed extensions will be in the Dialog but you can switch to all files if you want to try a different format. 6. WINDOWS EXECUTABLE IS NOW ONLINE. The DEFINES I put in the source worked perfectly. 7. MACOS Build added courtesy of AndreasEK.
When I wrote my previous BVLOAD convertor I had problems under Windows with certain
ImageMagick versions that used 16 bits per color channel. I did include a link on there
before but the ImageMagick people have broken my link twice now.
The ImageMagick License allows redistribution with attribution. This belongs
to ImageMagick Studio. LLC.
License link here: https://imagemagick.org/script/license.php
I'm including here the 8 bit per color channel version for Windows that works correctly with
both of my convertors.