FanTranslatorsInternational / Kuriimu2

Kuriimu is a general purpose game translation project manager and toolkit for authors of fan translations and game mods.
GNU General Public License v3.0
308 stars 56 forks source link

I can't convert *.xi files to *.png file: Format 3 #258

Open DectetiveWibWob opened 1 year ago

DectetiveWibWob commented 1 year ago

Game Name: Yo-Kai Watch 1 for Nintendo Switch
Console: Nintendo Switch
Format extension(s): .xi
Type: "Format 3 is not supported by the encoding definition"

Bug details: I can't convert .xi files to .png files.

RealDarkCraft commented 10 months ago

open you'r file in an hex editor replace IMGN00 by IMGV00, now you can open the file in kuriimu and after, replace IMGV00 by IMGN00 and save the file

onepiecefreak3 commented 10 months ago

Very bad idea! IMGN is the format for Nintendo Switch, IMGV is for the Playstation Vita. They use different logic to load and save the file for a reason. Especially since Switch and Vita use different encoding sets as well.

RealDarkCraft commented 10 months ago

ah, ok didn't know... sorry so to solve the problem you would have to replace this code in the ImgxSupport.cs : private static readonly Dictionary<int, IColorEncoding> SwitchFormats = new Dictionary<int, IColorEncoding> { [0] = new Rgba(8, 8, 8, 8, "ABGR"),

    [0x03] = ImageFormats.Rgb888(),

    [0x1D] = ImageFormats.Dxt1()
    };