diff --git a/Tools/iff2html/image.c b/Tools/iff2html/image.c
index ef27fef..21ce7dc 100644
--- a/Tools/iff2html/image.c
+++ b/Tools/iff2html/image.c
@@ -53,20 +53,12 @@ int WritePNG(const char * OutName, const IFFChunk * ChunkData, const IFFSprite *
Image.Width = BMPHeader.biWidth;
Image.Height = BMPHeader.biHeight;
-
- row_pointers = malloc(Image.Height * sizeof(png_bytep));
- if(row_pointers == NULL){
- free(Image.Data);
- return 0;
- }
- for(i=0; iWidth;
Image.Height = Sprite->Height;
Image.Data = Sprite->BGRA32Data;
-
+
/* Swap from BGR to RGB; this cannot be done with libpng when you use opng_reduce_image
** due to the state that it leaves png_ptr in */
for(i=0; i