Cropit tutorial2/3/2024 What we've effectively done in the above code is take the image stored in the surface under the variable tom, resize it to be 50 pixels wide and 95 pixels high, then save it back into the original surface, tom. NewSurface = (originalImage, (newWidth, newHeight)) ![]() If you add the above code in the Processing section of your game loop and run your program you should find that Tom is now half the size he was before. Let's make Tom a more reasonable size for our window : I've just introduced the more useful / common ones here but if you do a quick search you can discover more complex transforms available to you. There are other operations available through the transform module as well. You may apply these operations to any surface however, not just images.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |