diff --git a/internal/c/parts/video/image/decode/bmp/src.c b/internal/c/parts/video/image/decode/bmp/src.c index 54ae19990..cb0188a6c 100644 --- a/internal/c/parts/video/image/decode/bmp/src.c +++ b/internal/c/parts/video/image/decode/bmp/src.c @@ -1,46 +1,46 @@ #ifdef QB64_BACKSLASH_FILESYSTEM - #include "src\\EasyBMP.cpp" -#else - #include "src/EasyBMP.cpp" + #include "src\\EasyBMP.cpp" + #else + #include "src/EasyBMP.cpp" #endif uint8 *image_decode_bmp(uint8 *content,int32 bytes,int32 *result,int32 *x,int32 *y){ -//Result:bit 1=Success,bit 2=32bit[BGRA] -*result=0; - - - -BMP bm; - -if(!bm.ReadFromMemory((char*)content, bytes)){ - return NULL; -} - - - - -int32 h,w; -h=bm.TellHeight(); -w=bm.TellWidth(); - -uint8 *out; -out=(uint8*)malloc(h*w*4); - -uint8* o; -int32 x2,y2; -o=out; -for (y2=0;y2Blue; o++; - *o=bm(x2,y2)->Green; o++; - *o=bm(x2,y2)->Red; o++; - *o=255; o++; -} -} - -*result=1+2; -*x=w; -*y=h; -return out; - + //Result:bit 1=Success,bit 2=32bit[BGRA] + *result=0; + + + + BMP bm; + + if(!bm.ReadFromMemory((char*)content, bytes)){ + return NULL; + } + + + + + int32 h,w; + h=bm.TellHeight(); + w=bm.TellWidth(); + + uint8 *out; + out=(uint8*)malloc(h*w*4); + + uint8* o; + int32 x2,y2; + o=out; + for (y2=0;y2Blue; o++; + *o=bm(x2,y2)->Green; o++; + *o=bm(x2,y2)->Red; o++; + *o=255; o++; + } + } + + *result=1+2; + *x=w; + *y=h; + return out; + } \ No newline at end of file