浏览代码

added 16 bit png decode

Nicolas Cannasse 5 年之前
父节点
当前提交
a482c6ea7c
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9 0
      libs/fmt/fmt.c

+ 9 - 0
libs/fmt/fmt.c

@@ -68,6 +68,15 @@ HL_PRIM bool HL_NAME(png_decode)( vbyte *data, int dataLen, vbyte *out, int widt
 	case 10:
 		img.format = PNG_FORMAT_ARGB;
 		break;
+	case 12:
+		img.format = PNG_FORMAT_LINEAR_Y;
+		break;
+	case 13:
+		img.format = PNG_FORMAT_LINEAR_RGB;
+		break;
+	case 14:
+		img.format = PNG_FORMAT_LINEAR_RGB_ALPHA;
+		break;
 	default:
 		hl_blocking(false);
 		png_image_free(&img);