Manipulating Images for Use in Texturing

The OpenGL Utility library (GLU) provides image scaling and automatic mipmapping functions to simplify the specification of texture images. The gluScaleImage function scales a specified image to an accepted texture size; you can pass the resulting image to OpenGL as a texture. The automatic mipmapping functions, gluBuild1DMipmaps and gluBuild2DMipmaps, create mipmapped texture images from a specified image and pass them to glTexImage1D and glTexImage2D, respectively.