rendered paste body public enum ColourType { Greyscale, Truecolour, Indexed_colour, Greyscale_with_alpha, Truecolour_with_alpha, Invalid; public static ColourType byteToColourType(byte b){ switch (b) { case 0: return ColourType.Greyscale; case 2: return ColourType.Truecolour; case 3: return ColourType.Indexed_colour; case 4: return ColourType.Greyscale_with_alpha; case 6: return ColourType.Truecolour_with_alpha; default: return ColourType.Invalid; } } public String toString () { return super.toString().replace('_', ' '); } } public enum InterlaceMethod { No_Interlace {public String toString(){return "No interlace";}}, Adam7, Invalid }