Homebrew Converting .png to .bin and .h

mashers

Stubborn ape
OP
Member
Joined
Jun 10, 2015
Messages
3,837
Trophies
0
Age
40
Location
Kongo Jungle
XP
5,074
Country
When I build home brew launcher from source, I can put png files which have been converted to .bin into the data directory, and it gets compiled into the product and the object can be referenced through a header file.

I'm currently using a web based tool to convert the image to the .bin file, but I want to be able to display png images from SD without having to convert them first. Does anybody know what format the .bin file is in, and if there is a method of doing the same thing in C?
 

730

Professional Shitposter
Member
Joined
Apr 2, 2015
Messages
485
Trophies
0
XP
628
Country
Argentina
From here:
the image is clockwise rotated by 90 degrees and its B and R channels are swapped. The first operation is done because the 3DS screens are actually portrait screens rotated by 90 degrees (in a counter-clockwise direction), while the second one is done because the 3DS screens' framebuffers have a BGR888 color format, by default

Now you figure out how to do that because I don't know C or anything :P
 

mashers

Stubborn ape
OP
Member
Joined
Jun 10, 2015
Messages
3,837
Trophies
0
Age
40
Location
Kongo Jungle
XP
5,074
Country
Thanks. Looking into it, it seems to be a standalone PNG encoding/decoding function. If it can decode it into the right type of data then it could work. Thanks!

I think hbl does that to optimize and embed its graphics thoughh
Sure, and I don't intend to do this for any built in graphics such as the UI. I want to give the option of adding a high resolution icon for the top screen, and I don't want the user to have to convert to .bin format in advance.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    ButterScott101 @ ButterScott101: