Stretching an image by means of opengl?

Hello! How can I stretch the image at the pixel means opengl?

Check out ofTexture, and textureExample in particular.

The textureExample is in examples/gl/textureExample/

Documentation for ofTexture is here : http://www.openframeworks.cc/documentation/gl/ofTexture.html

I’m not sure if that actually answers your question though. Do you mean changing the size of an image file?

I don’t want to change the size of image.I want to draw the image to a defenite pixel, then copy this pixel as many times as I need, and then draw the remained part of the image. And I want to do it all with the help of opengl, not copying pixels from the memory.

best way is to write a GLSL shader. You can find also here on the forum some “zoom” shader effects that could be a good starting point to understand how to achieve your goal.

But shaders doesn’t work at IOs

for glsl on iOS give a look here: http://forum.openframeworks.cc/t/transitioning-ios-to-es2.0/9201/1

I suppose you could do some “pixel stretching” also in old style openGL using texture coordinates and a grid-like mesh (similar to what you do when you projection mapping).