API: Jpeg should load properly
This commit is contained in:
@@ -29,12 +29,6 @@
|
||||
(((unsigned int)(a) << SHIFT_24) | ((unsigned int)(r) << SHIFT_16) | \
|
||||
((unsigned int)(g) << SHIFT_8) | (unsigned int)(b))
|
||||
|
||||
#define ENCODE_BGRA(r, g, b, a) \
|
||||
(((unsigned int)(a) << 24) | \
|
||||
((unsigned int)(r) << 16) | \
|
||||
((unsigned int)(g) << 8) | \
|
||||
((unsigned int)(b) << 0))
|
||||
|
||||
// #define ENCODE_BGRA(b, g, r, a) \
|
||||
// (((unsigned int)(b) << SHIFT_24) | ((unsigned int)(g) << SHIFT_16) | \
|
||||
// ((unsigned int)(r) << SHIFT_8) | (unsigned int)(a))
|
||||
|
||||
+1
-1
@@ -169,7 +169,7 @@ jpeg_save(const unsigned int* src_buf, const JPEG* attr, const char* name)
|
||||
tj3Set(tjcompress, TJPARAM_QUALITY, 80);
|
||||
tj3Set(tjcompress, TJPARAM_SUBSAMP, TJSAMP_420);
|
||||
if (tj3Compress8(tjcompress, (unsigned char*)src_buf, attr->width, 0,
|
||||
attr->height, TJPF_BGRA, &dst_buf, &dst_size) < 0)
|
||||
attr->height, TJPF_ARGB, &dst_buf, &dst_size) < 0)
|
||||
{
|
||||
printf("TurboJPEG Error: %s\n", tj3GetErrorStr(tjcompress));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user