+#pragma once
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#define __max(a,b) (((a) > (b)) ? (a) : (b))
#define __min(a,b) (((a) < (b)) ? (a) : (b))
-#pragma once
#pragma pack(push, 1)
struct DDS_PIXELFORMAT {
#define DDS_HEADER_PFSIZE 32
#define DDS_MAGICNUM 0x20534444;
+#define DDS_FLIP_VERTICALLY_ON_WRITE
+
/*
imageData: Pointer to image data
compressedSize: Pointer to final data size
}
else
{
- output.write((char*)imageData, final_image_size);
+ for (int row = 0; row < h; row++) {
+ output.write((char*)imageData + (final_image_size - (row * w * 3)), w * 3);
+ }
}
output.close();