Image Converter

Libraries, utilities, bootloaders...

Re: Image Converter

Postby DFX2KX » Sat May 24, 2014 6:50 am

ripper121 wrote:you can generate a Map with sprites.
You use an 2D array of byte for map config

byte myMap[10][6] = {
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
};

now you can for every byte (in this map every 0) creat 255 Sprites

So you loop trouth the myMap and Draw the Sprits every 8 Pixel in x and y with,
gb.display.drawBitmap(x, y, bitmap);


Ah, okay! Thanks for that! (I imagine you could save a few ms by checking each time if the sprite in question will even be visible, and skip drawing it if need be)

Alas, I've gotten gray to (kinda) work! The Emulator can't handle that much flicker, but it works! great tool, I'm going to use the heck out of it.
DFX2KX
 
Posts: 250
Joined: Mon Apr 14, 2014 3:48 am

Re: Image Converter

Postby ripper121 » Tue May 27, 2014 1:39 pm

UPDATE:
-solve the bug if the image is smaller then 8x8 pixel
User avatar
ripper121
 
Posts: 224
Joined: Fri Apr 04, 2014 2:02 pm
Location: Germany

Re: Image Converter

Postby rodot » Tue May 27, 2014 4:23 pm

ripper121 wrote:UPDATE:
-solve the bug if the image is smaller then 8x8 pixel


Thanks for updating that nice piece of software! I just want to precise that the library needs the width to be a multiple of 8px, but it supports heights < 8 px.
User avatar
rodot
Site Admin
 
Posts: 1290
Joined: Mon Nov 19, 2012 11:54 pm
Location: France

Re: Image Converter

Postby ripper121 » Tue May 27, 2014 4:44 pm

Yes but the format B00000000 should be the range.
If you like you can put the converter to the Library ;)
User avatar
ripper121
 
Posts: 224
Joined: Fri Apr 04, 2014 2:02 pm
Location: Germany

Re: Image Converter

Postby DFX2KX » Fri May 30, 2014 8:34 pm

ripper121 wrote:you can generate a Map with sprites.
You use an 2D array of byte for map config

byte myMap[10][6] = {
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
};

now you can for every byte (in this map every 0) creat 255 Sprites

So you loop trouth the myMap and Draw the Sprits every 8 Pixel in x and y with,
gb.display.drawBitmap(x, y, bitmap);


Thanks, that turned out to be quite similar to what I did.

Also, just so you know. on Windows 7, the image converter likes to take the icon of one of the other applications on the taskbar, usually seems to be whatever the last thing I opened before the program itself was. It's not serious, just odd. I wasn't sure if it was supposed to have it's own Icon, of if my Windows is just deciding to act weird with it.
DFX2KX
 
Posts: 250
Joined: Mon Apr 14, 2014 3:48 am

Re: Image Converter

Postby ripper121 » Sat May 31, 2014 7:27 pm

Yes it's a bug but I don't know from where it comes. When you download the source you can see there is a gb logo icon.
User avatar
ripper121
 
Posts: 224
Joined: Fri Apr 04, 2014 2:02 pm
Location: Germany

Re: Image Converter

Postby DFX2KX » Sat May 31, 2014 9:31 pm

ripper121 wrote:Yes it's a bug but I don't know from where it comes. When you download the source you can see there is a gb logo icon.


Well, at least it's not me!
DFX2KX
 
Posts: 250
Joined: Mon Apr 14, 2014 3:48 am

Re: Image Converter

Postby Skyrunner65 » Wed Jun 25, 2014 8:43 pm

Linux build?
User avatar
Skyrunner65
 
Posts: 371
Joined: Thu Mar 20, 2014 5:37 pm
Location: NC,USA

Re: Image Converter

Postby rodot » Wed Jun 25, 2014 9:16 pm

Skyrunner65 wrote:Linux build?

A "please" doesn't harm. I made a Java based bitmap encoder, I'll upload it soon.
User avatar
rodot
Site Admin
 
Posts: 1290
Joined: Mon Nov 19, 2012 11:54 pm
Location: France

Re: Image Converter

Postby Skyrunner65 » Fri Jun 27, 2014 12:53 am

Sorry, I didn't think about it.
But Java-based? Yay!
User avatar
Skyrunner65
 
Posts: 371
Joined: Thu Mar 20, 2014 5:37 pm
Location: NC,USA

PreviousNext

Return to Software Development

Who is online

Users browsing this forum: No registered users and 19 guests

cron