]> Chaos Git - corbenik/ctrulib.git/commitdiff
simplify imagemagick conversion
authorDave Murphy <davem@devkitpro.org>
Wed, 18 Feb 2015 15:06:09 +0000 (15:06 +0000)
committerDave Murphy <davem@devkitpro.org>
Wed, 18 Feb 2015 15:06:09 +0000 (15:06 +0000)
examples/graphics/bitmap/24bit-color/Makefile
examples/graphics/bitmap/24bit-color/source/main.c

index cb71216d917f27eb40d8e5095386e0751d4e7666..acbfaf4de9a8e7445d8424e3f8389edc514a4715 100755 (executable)
@@ -94,7 +94,7 @@ endif
 #---------------------------------------------------------------------------------
 
 export OFILES  :=      $(addsuffix .o,$(BINFILES)) \
-                       $(PNGFILES:.png=.rgb.o) \
+                       $(PNGFILES:.png=.bgr.o) \
                        $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) \
 
 export INCLUDE :=      $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
@@ -172,16 +172,16 @@ $(OUTPUT).elf     :       $(OFILES)
 
 
 #---------------------------------------------------------------------------------
-%.rgb.o: %.rgb
+%.bgr.o: %.bgr
 #---------------------------------------------------------------------------------
        @echo $(notdir $<)
        @$(bin2o)
 
 #---------------------------------------------------------------------------------
-%.rgb: %.png
+%.bgr: %.png
 #---------------------------------------------------------------------------------
        @echo $(notdir $<)
-       @convert $< -channel B -separate $< -channel G -separate $< -channel R -separate -channel RGB -combine -rotate 90 $@
+       @convert $< -rotate 90 $@
 
 -include $(DEPENDS)
 
index b5c5a64985be8e05d7a1457033bec1f2db942393..9d88c821d6d8d664ad499b41baa4a5ec5f881c3d 100644 (file)
@@ -17,7 +17,7 @@
 #include <string.h>
 
 //This include a header containing definitions of our image
-#include "brew_rgb.h"
+#include "brew_bgr.h"
 
 int main(int argc, char **argv)
 {
@@ -37,7 +37,7 @@ int main(int argc, char **argv)
        u8* fb = gfxGetFramebuffer(GFX_BOTTOM, GFX_LEFT, NULL, NULL);
        
        //Copy our image in the bottom screen's frame buffer
-       memcpy(fb, brew_rgb, brew_rgb_size);
+       memcpy(fb, brew_bgr, brew_bgr_size);
 
        // Main loop
        while (aptMainLoop())