У меня есть код here, работающий отлично, за исключением того, что все немощные 2 изображения перевернуты в направлении y. В файле wxImageLoader есть этот цикл, который я считаю, является виновником:Unflip wxImage loading
for(int y=0; y<newHeight; y++)
{
for(int x=0; x<newWidth; x++)
{
if(x<(*imageWidth) && y<(*imageHeight)){
imageData[(x+y*newWidth)*bytesPerPixel+0]=
bitmapData[(x+(rev_val-y)*(*imageWidth))*old_bytesPerPixel + 0];
imageData[(x+y*newWidth)*bytesPerPixel+1]=
bitmapData[(x+(rev_val-y)*(*imageWidth))*old_bytesPerPixel + 1];
imageData[(x+y*newWidth)*bytesPerPixel+2]=
bitmapData[(x+(rev_val-y)*(*imageWidth))*old_bytesPerPixel + 2];
if(bytesPerPixel==4) imageData[(x+y*newWidth)*bytesPerPixel+3]=
alphaData[ x+(rev_val-y)*(*imageWidth) ];
}
else
{
imageData[(x+y*newWidth)*bytesPerPixel+0] = 0;
imageData[(x+y*newWidth)*bytesPerPixel+1] = 0;
imageData[(x+y*newWidth)*bytesPerPixel+2] = 0;
if(bytesPerPixel==4) imageData[(x+y*newWidth)*bytesPerPixel+3] = 0;
}
}//next
}//next
Но я не могу понять, как не-флип изображения.
Вы решили свою проблему? Или вы имеете в виду, что вышесказанное означает то, что вы хотели опубликовать изначально? – ParoXoN
это решило проблему с переворачиванием – DShook