Is there a place where I can learn how to copy a 2D texture pixel by pixel using java?

Is there a place where I can learn how to copy a 2D texture pixel by pixel using java?

Can't literally find any information that isn't unrelated gamedev or use game engines shit.

I just want to know how to copy a texture by iterating throught every pixel without making my CPU to freeze.

Attached: 79a26f181849feabba9590976d101a7f.jpg (500x384, 41K)

Other urls found in this thread:

im4java.sourceforge.net/
twitter.com/NSFWRedditVideo

you could probably use image magick for that

FUCK OFF.

I NEED TO COPY A TEXTURE PIXEL BY PIXEL USING JAVA.

PLS HELP.
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

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

NIGGER I WANT TO MAKE MY OWN DOWNSCALING APP.

I JUST CANT USE A 2D LOOP, IT MAKES MY PC TO CRASH.

>helps
>FUCK OFF. I REFUSE TO DO ANY RESEARCH ABOUT THIS ON MY OWN
help yourself little zoom zoom

GOOGLE IS USELESS

IT KEEPS GIVING ME RESULTS ABOUT USING GIMP, BEST EDITORS FOR PIXEL ART, HOW TO USE A GAME ENGINE.

1920x1080 = 2073600
that isn't a huge amount of loops. you're doing something wrong

im4java.sourceforge.net/
here you go little zoom zoom!

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

what do you mean by texture, op?

a 2D image.

gimp has an option to save images as c files then you can use a for loop and so on.

>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.

explain.

why did you help that street shitter

okay, how do I convert an int to a Color?

pajeet being spoonfed by incels on gee

I'm not a college student.

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.

fuck all are, youre just a bottom feeding pajeet,worse than neets

Just use OpenCV bro

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.