saveFile for saving in bmp format

Tagged: ,

This topic contains 1 reply, has 2 voices, and was last updated by  Lukasz Furmaniak 1 year, 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #53889

    Anoop
    Member

    Hi,

    I tried to use the saveFile API to save using bmp file but it saves as pvr format. Is bmp format supported to use with saveFile API of PVRTexLib?

    The steps i did is creating CPVRTextureHeader and then CPVRTexture using the header and data. Then i tried to call saveFile.

    Please guide.

    Thanks,
    Anoop

    #53896

    Hi Anoop,

    I talked with one of our engineers about this and what he had to say was that essentially, PVRTexLib handles textures, not images.

    To create a texture from an image file (PNG, BMP, JPEG etc.), you need to load the data yourself and put it into a PVRTexture object. You can then manipulate the texture, transcode it etc. and save it out to a pvr, ktx or dds file (which are texture formats).

    To save a texture into an image file, you need to make sure it has been transcoded to a format that the image file type supports, such as R8G8B8. Then you can extract the data from the surface you want (textures support cube maps, 3d textures, texture arrays etc.) and write it to disk as the image file of your choice.

    Put simply, PVRTexLib can save to and load from PVR, KTX and DDS texture formats. For image formats, you need to do this manually, or use the PVRTexToolCLI/PVRTexToolGUI.

    1 user thanked author for this post.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.