1. A method for operating an electronic device, the method comprising: determining, by at least one processor of the electronic device, whether the electronic device operates in a sleep mode; in response to determining that the electronic device operates in the sleep mode, identifying, by the at least one processor, an image resource with a first format for an application stored in a memory of the electronic device, based on receiving a request for creating a binary code for the application; converting, by the at least one processor, the image resource into a compressed texture; determining, by the at least one processor, whether to use the compressed texture to create a binary code for the application based on a quality of the compressed texture; in response to determining to use the compressed texture, repackaging, by the at least one processor, an installation package for the application to include the compressed texture such that the application is installed based on the installation package repackaged to include the compressed texture; and in response to determining not to use the compressed texture, converting, by the at least one processor, a format of the image resource from the first format to a second format and repackaging, by the at least one processor, an installation package for the application to include the image resource with the second format such that the application is installed based on the installation package repackaged to include the image resource with the second format.