mirror of https://github.com/bjornbytes/lovr.git
Don't encode Images upside down anymore;
This commit is contained in:
parent
bca10c9e98
commit
f5ec2e9158
|
@ -323,8 +323,8 @@ Blob* lovrImageEncode(Image* image) {
|
|||
lovrAssert(image->format == FORMAT_RGBA8, "Only images with the rgba8 format can be encoded");
|
||||
uint32_t w = image->width;
|
||||
uint32_t h = image->height;
|
||||
uint8_t* pixels = (uint8_t*) image->blob->data + (h - 1) * w * 4;
|
||||
int32_t stride = -1 * (int) (w * 4);
|
||||
uint8_t* pixels = (uint8_t*) image->blob->data;
|
||||
uint32_t stride = (int) (w * 4);
|
||||
|
||||
// The world's worst png encoder
|
||||
// Encoding uses one unfiltered IDAT chunk, each row is an uncompressed huffman block
|
||||
|
|
Loading…
Reference in New Issue