@@ -6,32 +6,6 @@ namespace AssetRipper.TextureDecoder.Dxt
66{
77 public static class DxtDecoder
88 {
9- /// <summary>
10- /// Decompress a DXT1 image
11- /// </summary>
12- /// <param name="input">Input buffer containing the compressed image.</param>
13- /// <param name="width">Pixel width of the image.</param>
14- /// <param name="height">Pixel height of the image.</param>
15- /// <param name="output">An output buffer of size 4 * width * height.</param>
16- /// <returns>Number of bytes read from <paramref name="input"/></returns>
17- public static int DecompressDXT1 ( ReadOnlySpan < byte > input , int width , int height , out byte [ ] output )
18- {
19- return DecompressDXT1 < ColorBGRA32 , byte > ( input , width , height , out output ) ;
20- }
21-
22- /// <summary>
23- /// Decompress a DXT1 image
24- /// </summary>
25- /// <param name="input">Input buffer containing the compressed image.</param>
26- /// <param name="width">Pixel width of the image.</param>
27- /// <param name="height">Pixel height of the image.</param>
28- /// <param name="output">An output buffer. Must be at least 4 * width * height.</param>
29- /// <returns>Number of bytes read from <paramref name="input"/></returns>
30- public static int DecompressDXT1 ( ReadOnlySpan < byte > input , int width , int height , Span < byte > output )
31- {
32- return DecompressDXT1 < ColorBGRA32 , byte > ( input , width , height , output ) ;
33- }
34-
359 /// <summary>
3610 /// Decompress a DXT1 image
3711 /// </summary>
@@ -128,32 +102,6 @@ public static int DecompressDXT1<TOutputColor, TOutputChannelValue>(ReadOnlySpan
128102 return offset ;
129103 }
130104
131- /// <summary>
132- /// Decompress a DXT3 image
133- /// </summary>
134- /// <param name="input">Input buffer containing the compressed image.</param>
135- /// <param name="width">Pixel width of the image.</param>
136- /// <param name="height">Pixel height of the image.</param>
137- /// <param name="output">An output buffer of size 4 * width * height.</param>
138- /// <returns>Number of bytes read from <paramref name="input"/></returns>
139- public static int DecompressDXT3 ( ReadOnlySpan < byte > input , int width , int height , out byte [ ] output )
140- {
141- return DecompressDXT3 < ColorBGRA32 , byte > ( input , width , height , out output ) ;
142- }
143-
144- /// <summary>
145- /// Decompress a DXT3 image
146- /// </summary>
147- /// <param name="input">Input buffer containing the compressed image.</param>
148- /// <param name="width">Pixel width of the image.</param>
149- /// <param name="height">Pixel height of the image.</param>
150- /// <param name="output">An output buffer. Must be at least 4 * width * height.</param>
151- /// <returns>Number of bytes read from <paramref name="input"/></returns>
152- public static int DecompressDXT3 ( ReadOnlySpan < byte > input , int width , int height , Span < byte > output )
153- {
154- return DecompressDXT3 < ColorBGRA32 , byte > ( input , width , height , output ) ;
155- }
156-
157105 /// <summary>
158106 /// Decompress a DXT3 image
159107 /// </summary>
@@ -260,32 +208,6 @@ public static int DecompressDXT3<TOutputColor, TOutputChannelValue>(ReadOnlySpan
260208 return offset ;
261209 }
262210
263- /// <summary>
264- /// Decompress a DXT5 image
265- /// </summary>
266- /// <param name="input">Input buffer containing the compressed image.</param>
267- /// <param name="width">Pixel width of the image.</param>
268- /// <param name="height">Pixel height of the image.</param>
269- /// <param name="output">An output buffer of size 4 * width * height.</param>
270- /// <returns>Number of bytes read from <paramref name="input"/></returns>
271- public static int DecompressDXT5 ( ReadOnlySpan < byte > input , int width , int height , out byte [ ] output )
272- {
273- return DecompressDXT5 < ColorBGRA32 , byte > ( input , width , height , out output ) ;
274- }
275-
276- /// <summary>
277- /// Decompress a DXT5 image
278- /// </summary>
279- /// <param name="input">Input buffer containing the compressed image.</param>
280- /// <param name="width">Pixel width of the image.</param>
281- /// <param name="height">Pixel height of the image.</param>
282- /// <param name="output">An output buffer. Must be at least 4 * width * height.</param>
283- /// <returns>Number of bytes read from <paramref name="input"/></returns>
284- public static int DecompressDXT5 ( ReadOnlySpan < byte > input , int width , int height , Span < byte > output )
285- {
286- return DecompressDXT5 < ColorBGRA32 , byte > ( input , width , height , output ) ;
287- }
288-
289211 /// <summary>
290212 /// Decompress a DXT5 image
291213 /// </summary>
0 commit comments