[LibGDX] Resize Texture for use with TextureRegion

I want to resize a texture before sending it to be chopped up by TextureRegion.

Is this possible?

I’ve already tried using Sprites and that didn’t work and I’m really not sure where else to look. It’s probably something simple I’m just missing.

Note: I’m aware I can do this in an external program but I want my game to be able to do this on the fly.

I rarely use Texture now. I get a Drawable from atlas and scale it freely with setWidth(), setHeight(), scale(), or setScale().

Resizing the texture on the screen isn’t the problem. TextureRegion using the textures native resolution is my problem.

Let’s say I have a texture that’s 100x100 but I need it to be 50x50 for use with TextureRegion. I need to resize the native resolution to 50x50 before sending it to be cut into pieces by TextureRegion.

For further clarification I’m splitting up a single picture into many little pictures that make up the main picture. I’m making a puzzle type game.

The pictures all need to be a certain resolution for the game to work correctly.

Then you have logic problem if TextureRegion size dictate the code flow.

Just think about it little. Texture is nothing more than 2d array of bytes at gpu memory. This 2d array have size and those bytes are interpreted as colors usually. You can pretty much use this data how you want.
TextureRregion is just helper class that has texture as reference and texture coordinates that describe rectangle shaped portion of that original texture. So textureRegion does no split anything it just have additional texture coordinates.

So what you want to achieve?

You have a good point. I was looking at this wrong. Instead of downsizing the image I can just increase the tile size based on the texture resolution and then downsize the sprite that holds the tile so it will work with any size image…

Thank you, sir.