Rotating and / or flipping images is a simple task for GDI+. To see the different results possible, change the constant value in the parameter "rotateflip" in the code below.
*-- RotateFlipType constants #DEFINE RotateNoneFlipNone 0 #DEFINE Rotate90FlipNone 1 #DEFINE Rotate180FlipNone 2 #DEFINE Rotate270FlipNone 3 #DEFINE RotateNoneFlipx 4 #DEFINE Rotate90Flipx 5 #DEFINE Rotate180Flipx 6 #DEFINE Rotate270Flipx 7 LOCAL lcSource, lcDestination m.lcSource = GETPICT("jpg;gif;bmp") LOCAL loImage AS gpImage OF FFC / _GdiPlus.vcx m.loImage = NEWOBJECT("gpimage",HOME() + "ffc/_gdiplus.vcx") m.loImage.CreateFromFile(m.lcSource) m.loImage.ROTATEFLIP(Rotate180FlipNone) && try changing using the constants above m.loImage.SaveToFile("Flipped.png","image/png") RUN /N Explorer.EXE Flipped.Png
Versión en Español de este artículo in / Spanish version at http://www.portalfox.com/article.php?sid=2181
ReplyDelete