Is it possible to rotate image by 90 degrees without using GetPixel and SetPixel?
Printable View
Is it possible to rotate image by 90 degrees without using GetPixel and SetPixel?
Well there's DirectX ;)
VB4, can't use DX.
:eek:
UPGRADE!
Use BitBlt for every pixel :p
Use stretchblt, you can use negative numbers for width/height to rotate it 90ยบ ;)
Wouldn't that just mirror and flip the picture?
Use c++, loop trough all pixels
counter clockwise
newX=-oldY;
newY=oldX;
clockwise
newX=oldY;
newY=-newX;
PsychoMark, thanks for the BilBlt pixel-by-pixel idea. It really works faster than GetPixel/SetPixel, atleast my game loads much faster now :)
Wow, never though it would actually work faster. Thanks for letting me know too... :)
Maybe it has something to do with the number of API calls. Like, with GetPixel & SetPixel you need more VB code in the middle. You never know for sure.