From 257f77a05d33591a5a1522fd4b04d02c32983b3e Mon Sep 17 00:00:00 2001 From: Dave Murphy Date: Wed, 18 Feb 2015 15:06:09 +0000 Subject: [PATCH] simplify imagemagick conversion --- examples/graphics/bitmap/24bit-color/Makefile | 8 ++++---- examples/graphics/bitmap/24bit-color/source/main.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/graphics/bitmap/24bit-color/Makefile b/examples/graphics/bitmap/24bit-color/Makefile index cb71216..acbfaf4 100755 --- a/examples/graphics/bitmap/24bit-color/Makefile +++ b/examples/graphics/bitmap/24bit-color/Makefile @@ -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) diff --git a/examples/graphics/bitmap/24bit-color/source/main.c b/examples/graphics/bitmap/24bit-color/source/main.c index b5c5a64..9d88c82 100644 --- a/examples/graphics/bitmap/24bit-color/source/main.c +++ b/examples/graphics/bitmap/24bit-color/source/main.c @@ -17,7 +17,7 @@ #include //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())