Jelajahi Sumber

Revert "WebP: Add optional debugging code for dumping ALPH as standa..."

This reverts commit 7a4dd8ad79aff9e66e8ae31820b41582be0a3a6d.
Having it in git history is enough.
Nico Weber 2 tahun lalu
induk
melakukan
5793579d84
1 mengubah file dengan 0 tambahan dan 21 penghapusan
  1. 0 21
      Userland/Libraries/LibGfx/ImageFormats/WebPLoader.cpp

+ 0 - 21
Userland/Libraries/LibGfx/ImageFormats/WebPLoader.cpp

@@ -245,27 +245,6 @@ static ErrorOr<void> decode_webp_chunk_ALPH(Chunk const& alph_chunk, Bitmap& bit
         return {};
     }
 
-#if 0
-    dbgln("writing compressed alpha channel to alph.webp");
-    u32 size0 = 1 + 4 + alpha_data.size(); // 1 byte 0x2f, 4 byte width/height, data. doesn't include size of VP8L chunk size field.
-    u32 size = strlen("WEBP") + strlen("VP8L") + sizeof(u32) + size0; // Doesn't include size of "RIFF" and file size field (but does include size of VP8L chunk size field)
-    FILE* f = fopen("alph.webp", "wb");
-    fwrite("RIFF", 1, 4, f);
-    fwrite(&size, 4, 1, f);
-    fwrite("WEBP", 1, 4, f);
-    fwrite("VP8L", 1, 4, f);
-
-    fwrite(&size0, 4, 1, f);
-    u8 signature = 0x2f;
-    fwrite(&signature, 1, 1, f);
-    u32 header_stuff = (bitmap.width() - 1) | ((bitmap.height() - 1) << 14);
-    fwrite(&header_stuff, 4, 1, f);
-
-    fwrite(alpha_data.data(), 1, alpha_data.size(), f);
-
-    fclose(f);
-#endif
-
     // "Lossless format compression: the byte sequence is a compressed image-stream (as described in the WebP Lossless Bitstream Format)
     //  of implicit dimension width x height. That is, this image-stream does NOT contain any headers describing the image dimension.
     //  Once the image-stream is decoded into ARGB color values, following the process described in the lossless format specification,