Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 SDL,我想将图像转换为灰度。那么我应该应用哪些设置SDL_CreateRGBSurface?我需要灰度图像是 8 位色深。
SDL_CreateRGBSurface
AFAIK,你不能。您需要创建一个新的空表面并单独读取和转换每个像素,然后将其复制到新表面。