Add support for Apple KTX format
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- csharp
- Lĩnh vực
- computer-graphics
Hướng nghiên cứu
Start by reviewing the ImageSharp.Textures code and the proof-of-concept commit, then inspect the linked LzfseSharp implementation and the existing ASTC support. Done means loading the documented Apple KTX chunks, decoding the LZFSE payload, and exposing the result as standard ASTC texture data despite the unpublished format specification.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Would there be any interest in adding support for the Apple KTX format? It would be very useful, at least for us, to be able to use this directly in ImageSharp. I saw that a request for adding support for CgBI images (another internal Apple image format) had been accepted, and this is a very similar situation.
It is a supercompressed variant of KTX1 using LZFSE. Once decrompressed from LZFSE, the textures can be decompressed as a standard ASTC compressed KTX texture.
The main challenge would be incorporating an LZFSE decoder in ImageSharp.Textures. I have an implementation that could, with a little improvement, be incorporated in ImageSharp.Textures as I have done for ASTC. LZFSE is thankfully a lot simpler and the scope is therefore much smaller than ASTC.
The other challenge is that this is an internal Apple variant with no published spec (that I could find).
I have made a proof of concept implementation: https://github.com/Erik-White/ImageSharp.Textures/commit/163f828bd9801917e5fd542e59a1fff5f37c8c17
Layout
[8 bytes] Magic: AAPL\r\n\x1A\n (0x4141504C 0D0A1A0A)
[chunks] Sequence of tagged chunks until end of file
Each chunk has an 8-byte header:
[4 bytes] Data size (little-endian uint32)
[4 bytes] Identifier (ASCII, e.g. "HEAD", "LZFS", "FILL")
[N bytes] Chunk data
HEAD chunk (84 bytes) contains texture metadata. Key fields at byte offsets within the
chunk data:
| Offset | Size | Field |
|---|---|---|
| 16 | 4 | Internal pixel format (OpenGL enum, e.g. 0x93B0 = ASTC 4x4) |
| 24 | 4 | Width |
| 28 | 4 | Height |
| 32 | 4 | Depth |
| 36 | 4 | Number of array elements |
| 40 | 4 | Number of faces |
| 44 | 4 | Number of mipmap levels |
LZFS chunk holds the texture payload. The first 4 bytes after the chunk header are skipped,
and the remainder is LZFSE-compressed ASTC block data.
- Ngôn ngữ chính
- C#
- Star
- 67
- Fork
- 17
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của SixLabors/ImageSharp.Textures
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
SixLabors/ImageSharp.Textures#14 · 3 bình luận ·
-
KTX2 supportĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
SixLabors/ImageSharp.Textures#3 · 5 bình luận ·
Tất cả issue của SixLabors/ImageSharp.Textures
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
rjmurillo/moq.analyzers#1468 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
[誤判定] `define` が `デフィね`・`デフィ値` になるCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở再現済み 要トリアージ 誤判定
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
yksr-melt/Meltype#421 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Facepunch/sbox-public#12063 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày