Homebrew [Q] A quick question regarding FTP-3DS and ftBrony's banner

ecaep42

Well-Known Member
OP
Newcomer
Joined
Aug 24, 2015
Messages
59
Trophies
0
XP
233
Country
United States
I'm not really good at this stuff, and they don't have an exact way they did it, so I thought I'd ask here because this seems active enough and helpful for noobs, so how do they make the .bin file for the banner? I compiled it hoping for the .png to work, but I guess not. Thanks for any help.
 

730

Professional Shitposter
Member
Joined
Apr 2, 2015
Messages
485
Trophies
0
XP
628
Country
Argentina
I'm still not sure how to do this on a programmatical way, but I opened banner.bin and bannerl.bin with a hex editor (I think only the latter file is actually used though) and filled everything with zeroes, and I indeed got a black banner. I'm staying with that for now and maybe I'll find some way to convert png to binary and viceversa later.
 

CeeDee

fuckin dork
Member
Joined
May 4, 2014
Messages
5,360
Trophies
3
XP
9,942
Country
United States
Is it a big deal? It doesn't affect the usage of the program if it has rainbow ponies on it, whether you like them or hate them. Just ignore it and use the program for its intention.
 

730

Professional Shitposter
Member
Joined
Apr 2, 2015
Messages
485
Trophies
0
XP
628
Country
Argentina
Is it a big deal? It doesn't affect the usage of the program if it has rainbow ponies on it, whether you like them or hate them. Just ignore it and use the program for its intention.
This is FTP-3DS I was talking about, which already replaces the pony with some Nintendo image, but what if I don't want an image at all? Or what if I want my own rad custom image, something like... uhh, this?
banner.png
 

CeeDee

fuckin dork
Member
Joined
May 4, 2014
Messages
5,360
Trophies
3
XP
9,942
Country
United States
This is FTP-3DS I was talking about, which already replaces the pony with some Nintendo image, but what if I don't want an image at all? Or what if I want my own rad custom image, something like... uhh, this?
View attachment 23994
Did you try renaming the file to a .png? Or using a .bin to .png converter?
 

ecaep42

Well-Known Member
OP
Newcomer
Joined
Aug 24, 2015
Messages
59
Trophies
0
XP
233
Country
United States
It looks like the made the banner into an array of raw RGB data and copied the data to the frame buffer.

Helpful, but now I need to find a way to convert it to Raw RGB, which, when searched, people say it's not possible. Perhaps you know how to do it? Or someone else?
 

730

Professional Shitposter
Member
Joined
Apr 2, 2015
Messages
485
Trophies
0
XP
628
Country
Argentina
It looks like the made the banner into an array of raw RGB data and copied the data to the frame buffer.
Yup. But my programming knowledge isn't very advanced so I'm not sure how to do the conversion.
Just now I've tried converting a png to RAW (the one I posted above) and renaming that as a .bin, but the color was wrong and the pixels all in disorder... Maybe it has something to do with that the function for reading the image reads it by columns, and the one I made was made for being read by rows.

I'll see if tomorrow I'm able to learn some basic C and make something up.
 

gudenau

Largely ignored
Member
Joined
Jul 7, 2010
Messages
3,882
Trophies
2
Location
/dev/random
Website
www.gudenau.net
XP
5,418
Country
United States
Helpful, but now I need to find a way to convert it to Raw RGB, which, when searched, people say it's not possible. Perhaps you know how to do it? Or someone else?

Yup. But my programming knowledge isn't very advanced so I'm not sure how to do the conversion.
Just now I've tried converting a png to RAW (the one I posted above) and renaming that as a .bin, but the color was wrong and the pixels all in disorder... Maybe it has something to do with that the function for reading the image reads it by columns, and the one I made was made for being read by rows.

I'll see if tomorrow I'm able to learn some basic C and make something up.
Also, start with Java. It is C like and you do not need to worry about memory, good for starting.

Somthing like this in Java.
Code:
public class ImageToBin {
public static void main(String[] args){
  BufferedImage image = ImageIO.read(new File(args[0]));
  FileOutputStream out = new FileOutputStream(new Filee(args[1]));
  for(int x = 0; x < image.getWidth(); x++){
   for(int y = 0; y < image.getHeight(); y++){
    int rgb = image.getRGB(x, y);
    out.write(rgb & 0xFF)
    out.write((rgb >> 8) & 0xFF);
    out.write((rgb >> 16) & 0xFF);
   }
  }
  out.close();
}
}

The run it like "java ImageToBin image.png image.bin", keep in mind that the size of the bin will be width * height * 3 because it is not compressed.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    BakerMan @ BakerMan: this is him being described