1. A method of processing an image in an electronic device, the method comprising: determining, by a processor of the electronic device, whether a number of surfaces which can be partitioned in image data can be calculated, the image data being stored in a memory of the electronic device; predicting a number of vertexes in the image data when it is determined that the number of surfaces can be calculated; determining, by the processor, an inverse distortion rendering method for inverse distortion rendering of the image data based on the predicted number of vertexes; rendering, by the processor, the image data to a distorted image based on the determined inverse distortion rendering method; and displaying, by a display of the electronic device, the distorted image, wherein the inverse distortion rendering method is determined as a 2-pass mode when the predicted number of vertexes is greater than or equal to a reference, and the inverse distortion rendering method is determined as a 1-pass mode when the predicted number of vertexes is less than the reference.