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

Discussion in '3DS - Homebrew Development and Emulators' started by ecaep42, Aug 24, 2015.

  1. ecaep42
    OP

    ecaep42 Advanced Member

    Newcomer
    55
    29
    Aug 24, 2015
    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.
     
  2. ecaep42
    OP

    ecaep42 Advanced Member

    Newcomer
    55
    29
    Aug 24, 2015
    United States
    Bump

    i could really use help
     
  3. VegaRoXas

    VegaRoXas GBAtemp Regular

    Member
    290
    158
    Mar 29, 2015
    Gambia, The
    Also interested in this :3
     
  4. 730

    730 Professional Shitposter

    Member
    465
    376
    Apr 2, 2015
    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.
     
  5. CeeDee

    CeeDee hm?

    Member
    3,804
    5,309
    May 4, 2014
    United States
    somewhere
    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.
     
  6. 730

    730 Professional Shitposter

    Member
    465
    376
    Apr 2, 2015
    Argentina
    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
     
  7. CeeDee

    CeeDee hm?

    Member
    3,804
    5,309
    May 4, 2014
    United States
    somewhere
    Did you try renaming the file to a .png? Or using a .bin to .png converter?
     
  8. gudenau

    gudenau Never a unique idea

    Member
    3,257
    1,224
    Jul 7, 2010
    United States
    /dev/random
    It looks like the made the banner into an array of raw RGB data and copied the data to the frame buffer.
     
  9. ecaep42
    OP

    ecaep42 Advanced Member

    Newcomer
    55
    29
    Aug 24, 2015
    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?
     
  10. 730

    730 Professional Shitposter

    Member
    465
    376
    Apr 2, 2015
    Argentina
    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.
     
  11. gudenau

    gudenau Never a unique idea

    Member
    3,257
    1,224
    Jul 7, 2010
    United States
    /dev/random
    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.
     
  12. Helreizer543

    Helreizer543 Member

    Newcomer
    49
    23
    Nov 24, 2014
    United States
  13. gudenau

    gudenau Never a unique idea

    Member
    3,257
    1,224
    Jul 7, 2010
    United States
    /dev/random
  14. ecaep42
    OP

    ecaep42 Advanced Member

    Newcomer
    55
    29
    Aug 24, 2015
    United States