Homebrew Converting .png to .bin and .h

  • Thread starter Thread starter mashers
  • Start date Start date
  • Views Views 6,343
  • Replies Replies 9

mashers

Stubborn ape
Member
Joined
Jun 10, 2015
Messages
3,837
Reaction score
5,181
Trophies
0
Age
42
Location
Kongo Jungle
XP
5,129
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?
 
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
 
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