CMYK Image to Sprite render

Hello,

I would like to ask if what approach to do in order to convert CMYK image to sprite. I tried once just a simple code see snipet below.

Currently Im using Unity 5.6.6f2

public Texture2D convert_image_ToTexture(string path)
{
        byte[] filedata = File.ReadAllBytes(path);
        Texture2D txt = new Texture2D(90, 90);
        txt.LoadImage(filedata);

        return txt;
}

Texture2D textture = new ImahetoSprite_Convrtr().convert_image_ToTexture(path);
ImgLogo1.sprite = Sprite.Create(textture, new Rect(0, 0, textture.width, textture.height), new Vector2(.5f, .5f));

but I got an question mark render.

124417-screenshot-2.png

can someone help me with my problem?
Thanks in advance.

LoadImage can only load jpg or png images at runtime. No other image format is supported. If you want to load a different format you need to either implement the loader yourself or find one that you can use. You haven’t mentioned the actual image file format so we can’t suggest anything.

Thanks for the response Bunny83.

Sorry, I forgot to mention the format but I tried to convert to sprite is jpg format which is CMYK mode doesn’t convert to sprite. I’m pretty sure gif doesn’t really support unity but for jpg and png which is RGB mode works well.