1. An image forming apparatus including a display unit, comprising: a graphics driver configured to use a graphics processor which renders an image to be displayed by the display unit; a graphics library configured to issue a rendering request to the graphics driver in accordance with a processing request via an API; and a virtual machine unit configured to execute a program described in a predetermined programming language, the virtual machine unit performing processing by issuing a processing request to the graphics library via the API in accordance with the program to be executed, wherein when performing rendering by executing the program, the virtual machine unit determines whether a color of image data in a frame buffer includes a transparency value, when the color includes a transparency value, selects a transparency processing-compatible graphics library as the graphics library and issues a rendering processing request to the graphics library, and when the color does not include a transparency value, selects a transparency processing-incompatible graphics library as the graphics library and issues a rendering processing request to the graphics library.