I NEED TO COPY A TEXTURE PIXEL BY PIXEL USING JAVA.
PLS HELP. AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Luke Butler
first you need to know how are the pixels stored in the texture >Can't literally find any information that isn't unrelated gamedev or use game engines shit. literally just repurpose the code
Aaron Clark
NIGGER I WANT TO MAKE MY OWN DOWNSCALING APP.
I JUST CANT USE A 2D LOOP, IT MAKES MY PC TO CRASH.
Austin Murphy
>helps >FUCK OFF. I REFUSE TO DO ANY RESEARCH ABOUT THIS ON MY OWN help yourself little zoom zoom
Gavin Cook
GOOGLE IS USELESS
IT KEEPS GIVING ME RESULTS ABOUT USING GIMP, BEST EDITORS FOR PIXEL ART, HOW TO USE A GAME ENGINE.
Hunter Russell
1920x1080 = 2073600 that isn't a huge amount of loops. you're doing something wrong
public void LOAD() { JFileChooser chooser = new JFileChooser(); FileNameExtensionFilter filter = new FileNameExtensionFilter( "PNG", "png"); chooser.setFileFilter(filter); int returnVal = chooser.showOpenDialog(null); if (returnVal == JFileChooser.APPROVE_OPTION) { String path = chooser.getSelectedFile().getAbsolutePath();
Texture tmp = new Texture(Gdx.files.absolute(path)); Pixmap pixmap = new Pixmap(tmp.getWidth(), tmp.getHeight(), Format.RGBA8888); pixmap.setColor(Color.WHITE); pixmap.fill(); tmp.getTextureData().prepare(); for (int x = 0; x
John Bennett
what do you mean by texture, op?
Xavier Mitchell
a 2D image.
Isaac Ward
gimp has an option to save images as c files then you can use a for loop and so on.
Cooper Taylor
>Color pixel = new Color(tmp.getTextureData().consumePixmap().getPixel(x, y)); Why are you getting the texture pixelmap every single fucking iteration like an idiot? there is your hint.
Jaxon Cooper
explain.
Elijah Jackson
why did you help that street shitter
Michael Adams
okay, how do I convert an int to a Color?
Jeremiah Long
pajeet being spoonfed by incels on gee
Alexander Cruz
I'm not a college student.
Andrew Hill
I've never done this in java but if I'm seeing it correctly try declaring the reference to the temp texture outside of the loops and just use the reference in the loop.
Christopher Flores
fuck all are, youre just a bottom feeding pajeet,worse than neets
Ryder Bailey
Just use OpenCV bro
Aaron Moore
Why are you using textures and game libraries in the first place?
If you really want to "MAKE YOUR OWN DOWNSCALING APP", start with bitmaps. Learn how they're formatted, load one into a byte array, and write your own getColor() method to get the RGB values for each pixel. Implement nearest neighbor scaling, and use it to fill up a new bitmap in a second array.
You've got the right idea with looping over the pixels. Just stop using libraries you don't understand.