views:

34

answers:

1

Im using CGBitmapContextCreate to read the data from a png file. I then resize the image with a couple of loops to fit the OpenGL ES image size criteria.

I was wondering if there is a better way to this.

Basically what I do now is have a nested loop like:

for(i<newHeight){
   for(j<newWidth){
      copy image data
   }
}

For instance can I pass the new sizes to the CGBitmapContextCreate when reading the data?

A: 

A nice extension: http://vocaro.com/trevor/blog/2009/10/12/resize-a-uiimage-the-right-way/

Matt Williamson
Although that seems useful it doesint quite seem to be what im looking for.Basically I have images of random size (ex:120x632) and I need to increase the sizes through coding to become the sizes required for OpenGL(in this case 128x1024), however I still draw the images with the original dimensions.
funckymonk