How can I split an Image object ( java.awt.Image ) into smaller images?
java.awt.Image
For example, splitting a 64 * 64px image into a sprite sheet of 16 16 * 16px images.
See: http://rameshjavablog.blogspot.com/2012/04/sub-image-from-image-using-java.html
Using a function such as:
image = createImage(new FilteredImageSource(image.getSource(),new CropImageFilter(13, 13, 143, 163)));
You create an image using the "crop image filter").
Then it should be just a repetition of the original image, capturing the various squares that you want.
Source: https://habr.com/ru/post/945447/More articles:Get standard / preferred file extension - unixCan push notifications be done with AngularJS + Flask? - pythonPHPUnit --no-coverage function to overwrite configuration file - phpWhat is the difference between string pointers to C #? - c #org.codehaus.jackson.JsonParseException: Unexpected character ('' (code 65279 / 0xfeff): a valid value is expected - javaDoes the .NET Garbage Collector increase stop-the-world or slow down unmanaged threads and timer callbacks? - garbage-collectionExiting a loop in Python - pythonDynamically insert SQL Server variable table into statement - sql-server-2008How can I get the Clojurescript namespace I got from from clojurescript? - clojurescriptChanges to child objects managed by child objects - oopAll Articles