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:
LaurentGom 2010-03-19 18:51:45 +00:00
parent 6b23d15a14
commit a09ee0f9e3

View File

@ -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];