Modding Help Supported PNG type?

Discussion in 'Mods' started by pepoluan, Jun 8, 2019.

  1. pepoluan

    pepoluan Big Damn Hero

    According to its specification, the PNG format has several "types":
    • 0 : grayscale without alpha channel (1,2,4,8,16)
    • 2 : true color without alpha channel (8,16)
    • 3 : indexed color (1,2,4,8)
    • 4 : grayscale with alpha channel (8,16)
    • 6 : true color with alpha channel (8,16)
    (Please note that ALL types support transparency, even without an alpha channel. With #3, transparency is defined as part of the RGBA palette; with #0 & #2, transparency is GIF-style: Assign one RGB color as 100% transparent pixel.)

    Which types are supported by the game and/or Content Patcher?

    EDIT: The reason I'm asking this is that I want to optimize the PNG files of the hundred+ mods I use. With OptimPNG, if I do not restrict it, sometimes it converts the PNG file from Type 6 to Type 3 or Type 2. The end result is indeed much smaller than the original PNG, but I'm concerned that the changed Type will cause issues with the game and/or graphic patcher mods such as CP.
    • Pathoschild

      Pathoschild Cosmos Killer

      PNG support is handled by SMAPI, which should handle any PNG type so far as I know. I suggest converting one PNG that's loaded through SMAPI (or Content Patcher) to each type and checking if it works in-game. If that test works, it should work for all mods since PNG support is centralised in SMAPI.
        pepoluan likes this.
      • pepoluan

        pepoluan Big Damn Hero

        Okay, after experimenting, I can state this:
        • LooseSprites/Cursors can NOT use paletted PNG -- the title screen will show banding, and the dialog pop ups will have this crazy quilt patch background. Still readable, but the effect is ugly.
        • Pictures and Characters seem to accept paletted PNG -- still checking
        • Furnitures and townInterior seem to accept paletted PNG as well
        I'll keep watching for quirks & glitches, if any.

        Share This Page