首页 > 解决方案 > RGBA buffer to JPEG libjpeg-turbo

问题描述

I'm trying to write the RGBA pixels I have into a JPEG image buffer using libjpeg-turbo as they support RGBA. Originally I was writing RGB to buffer using RGB buffer to JPEG buffer, what is wrong here? with JPEG-8 but now I need to write RGBA. Unfortunately the outright jpeg-8 lib doesn't support RGBA from the available colors to select, so libjpeg-turbo has caught my eye. Replacing jpeg-8 with libjpeg-turbo compiles everything nicely but setting JCS_EXT_RGBA yields Bogus color space. I'm reading the README on the github but it doesn't quite say outright how to have run-time support RGBA?

Any thoughts on previous users?

标签: c++

解决方案


推荐阅读