I have successfully used BmpCvt.exe V5.32 driven from the command line by a windows batch file to convert a number of .png to C bitmap files in 565 format using commands like:
BmpCvt.exe "my.png" -saveas"my.c",1,8 -exit
However when I try to add transparency, and save the file in A565 format (is it even correct that I need alpha format?) the C file generated has errors, so if I try:
BmpCvt.exe "my.png" -convertintotranspalette -saveas"my.c",1,27 -exit
then in the generated C file I get:
"static GUI_CONST_STORAGE unsignedchar _acmy[] = {
, 0x00,
, 0x00,"
VS2010 (at least) don't like the empty assignment in the array "{," and ",,".
Additionally, it does not seem to be setting transparency:
static GUI_CONST_STORAGE GUI_LOGPALETTE _Palmy = {
160, // Number of entries
0, // No transparency
&_Colorsmy[0]
};
Perhaps I misunderstand how to get transparency into my C bitmaps...
When driving BmpCvt.exe from the GUI I am unable to save in A565 format, and if I try any other format the BmpCvt.exe no longer shows "Transparent Yes, Color:000000" and changes to "Transparent -".
I have some further difficulty in looking for the correct command line options as there seems to be a discrepancy between the User & Reference Guide UM03001 (saveas format 27 is A556) and the BmpCvt.exe Help->Command line options which does not seem to be up to date and lists no alpha formats? I tried to add -transparency0 to my command line to specifically force the transparent colour but this had no effect.
It is clear to me I don't know what I am doing with this tool (!!!), please can somebody assist?
Thanks,
Will
BmpCvt.exe "my.png" -saveas"my.c",1,8 -exit
However when I try to add transparency, and save the file in A565 format (is it even correct that I need alpha format?) the C file generated has errors, so if I try:
BmpCvt.exe "my.png" -convertintotranspalette -saveas"my.c",1,27 -exit
then in the generated C file I get:
"static GUI_CONST_STORAGE unsignedchar _acmy[] = {
, 0x00,
, 0x00,"
VS2010 (at least) don't like the empty assignment in the array "{," and ",,".
Additionally, it does not seem to be setting transparency:
static GUI_CONST_STORAGE GUI_LOGPALETTE _Palmy = {
160, // Number of entries
0, // No transparency
&_Colorsmy[0]
};
Perhaps I misunderstand how to get transparency into my C bitmaps...
When driving BmpCvt.exe from the GUI I am unable to save in A565 format, and if I try any other format the BmpCvt.exe no longer shows "Transparent Yes, Color:000000" and changes to "Transparent -".
I have some further difficulty in looking for the correct command line options as there seems to be a discrepancy between the User & Reference Guide UM03001 (saveas format 27 is A556) and the BmpCvt.exe Help->Command line options which does not seem to be up to date and lists no alpha formats? I tried to add -transparency0 to my command line to specifically force the transparent colour but this had no effect.
It is clear to me I don't know what I am doing with this tool (!!!), please can somebody assist?
Thanks,
Will