Getting texture from spritesheet without affecting its size

Below is a code that loads a texture from a PNG file and keeps its original dimensions.

auto image = new (std::nothrow)Image();
image->initWithImageFile(textureName);
newTexture = new (std::nothrow)Texture2D();
newTexture->initWithImage(image);

What would be the corresponding code to load a texture from a spritesheet?

It would be easy to create a sprite from the spritesheet and take the texture from it but content scale factor messes up the content size of the sprite and therefore also breaks the power of two dimensions of the texture.

My textures have to be power of two as I need them in creating seamless and repeatable terrain. Below is the code how I set the texture parameters.

Texture2D::TexParams tRepeatParams;//set texture parameters
tRepeatParams.magFilter = tRepeatParams.minFilter = GL_LINEAR;
tRepeatParams.wrapS = GL_REPEAT;
tRepeatParams.wrapT = GL_REPEAT;
newTexture->setTexParameters(tRepeatParams);

Using GL_REPEAT does not work if the used texture does not have power of two dimensions.

Thanks in advance.

Without a custom shader you can only wrap individual textures, not spritesheets.