mirror of
https://github.com/SFML/SFML.git
synced 2024-11-29 06:41:05 +08:00
Fixed bug in JPEG saving (due to the last modification)
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1474 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
6b23d15a14
commit
a09ee0f9e3
@ -228,9 +228,9 @@ bool ImageLoader::WriteJpg(const std::string& filename, const std::vector<Uint8>
|
||||
std::vector<Uint8> buffer(width * height * 3);
|
||||
for (std::size_t i = 0; i < width * height; ++i)
|
||||
{
|
||||
buffer[i * 3 + 0] = pixels[i * 3 + 0];
|
||||
buffer[i * 3 + 1] = pixels[i * 3 + 1];
|
||||
buffer[i * 3 + 2] = pixels[i * 3 + 2];
|
||||
buffer[i * 3 + 0] = pixels[i * 4 + 0];
|
||||
buffer[i * 3 + 1] = pixels[i * 4 + 1];
|
||||
buffer[i * 3 + 2] = pixels[i * 4 + 2];
|
||||
}
|
||||
Uint8* ptr = &buffer[0];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user