simplify imagemagick conversion
This commit is contained in:
parent
6be71c218e
commit
257f77a05d
@ -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)
|
||||
|
||||
|
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user