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 d开发者_JS百科o 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 nice extension: http://vocaro.com/trevor/blog/2009/10/12/resize-a-uiimage-the-right-way/
精彩评论