Homebrew Help Loading Image From SD Card [SPIDER]

gudenau

Largely ignored
OP
Member
Joined
Jul 7, 2010
Messages
3,882
Trophies
2
Location
/dev/random
Website
www.gudenau.net
XP
5,426
Country
United States
Hmm. Could you check to make sure you are creating splash.bin properly? Not sure what else could be causing garbage graphics.


Code:
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.FileOutputStream;
 
import javax.imageio.ImageIO;
 
 
public class SplashConvert {
    public static void main(String[] args) throws Throwable{
        System.out.println(args[0]);
        System.out.println(args[1]);
       
        BufferedImage image = ImageIO.read(new File(args[0]));
        FileOutputStream out = new FileOutputStream(new File(args[1]));
       
        int[] data = new int[image.getWidth() * image.getHeight()];
        image.getRGB(0, 0, image.getWidth(), image.getHeight(), data, 0, image.getWidth());
 
        byte[] buffer = new byte[data.length * 3];
       
        for(int i = 0; i < data.length; i++){
            buffer[i*3] = (byte) (data[i] & 0x000000FF);
            buffer[i*3+1] = (byte) ((data[i]>>8) & 0x000000FF);
            buffer[i*3+2] = (byte) ((data[i]>>16) & 0x000000FF);
        }
       
        out.write(buffer);
        out.close();
    }
}
 

KazoWAR

Well-Known Member
Member
Joined
Aug 12, 2008
Messages
1,952
Trophies
1
Age
35
Location
Winter Haven
XP
2,130
Country
United States
change IFile_Read(file, read, buf, 0xE100); to IFile_Read(file, read, buf, 0x38400);

this causes a crash, i guess its just too much data to read in. we need to malloc memory so we dont overwrite stuff
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • K3Nv2 @ K3Nv2:
    Just because I said you were big that one time you believed me
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    The shameful part is, I fell so in love with her mask. If I could find the real woman she pretended to be I would die for her without a moments hesitation.
  • Psionic Roshambo @ Psionic Roshambo:
    Truly loved what was never there
  • Psionic Roshambo @ Psionic Roshambo:
    I would have fought demons, gods, armies.
  • BigOnYa @ BigOnYa:
    "Be gentle, I've never done this before." What, biatch you got 3 kids already. Lol, I know loves sucks hard when bad, but really good when good.
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    Lol BigOnYa I hear "I don't usually do sex on the first date" like every 2 to 3 weeks now...
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    I never quite know how to respond lol
  • Psionic Roshambo @ Psionic Roshambo:
    Apparently saying nothing is the correct response lol
  • Psionic Roshambo @ Psionic Roshambo:
    I know they be lying but damn I need something
  • BigOnYa @ BigOnYa:
    You say " is your boyfriend gonna stay and watch, or should I call A cab for him"
    +1
  • BigOnYa @ BigOnYa:
    @Psionic Roshambo I have alot of family that lives in St pete, Clearwater, Tampa area, what part of FL you in?
    +1
  • Sicklyboy @ Sicklyboy:
    what is good, family
  • Psionic Roshambo @ Psionic Roshambo:
    Elfers Florida lol
    +1
  • BigOnYa @ BigOnYa:
    Where is that, city close to
  • Psionic Roshambo @ Psionic Roshambo:
    Lived in Hudson from 1999-2023
  • Psionic Roshambo @ Psionic Roshambo:
    Like hmm 45 minutes north of Tampa
    +1
  • BigOnYa @ BigOnYa:
    Is nice down there, better than Ohio where I am, but I can't take the heat, year round
  • Psionic Roshambo @ Psionic Roshambo:
    Yeah the next 4 months pretty much suck
  • Psionic Roshambo @ Psionic Roshambo:
    Ohio I have been too a few times
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Born in Michigan and moved to Florida at 16 lol
    +1
  • BigOnYa @ BigOnYa:
    I'm near Columbus, suburbs called Hilliard.
  • Xdqwerty @ Xdqwerty:
    are you doxxing yourselves?
    +1
  • BigOnYa @ BigOnYa:
    Oh, I mean I'm in north Korea
  • Psionic Roshambo @ Psionic Roshambo:
    Lol Doxing is for people with something to hide
    Psionic Roshambo @ Psionic Roshambo: Lol Doxing is for people with something to hide