Have image(png - size 500x500) for
object's sprite(size 20x20).
I used scale ration 0.04 on
but that effected how physics are applied to
object later in game. So i don't want that.
1.How to export and save
object's sprite image while game is running as .png?
2.Why are images that are scaled by other image editors when imported in godot blurry, but when i directly in godot scale them down, they are not?
I have seen that godot does a good job with scaling down (no blurry result) as opposed to paint or many other scaling down applications on internet.
I have been trying for whole day in Java to scale down image, and:
I just can't understand why i couldn't convert
f = new File("pic1.png");
image_i = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
image_i = ImageIO.read(f);
int pixels = ((DataBufferInt) image_i.getRaster().getDataBuffer()).getData();
java.lang.ClassCastException: java.awt.image.DataBufferByte cannot be cast to java.awt.image.DataBufferInt
I have also tried to implement scaling algorithm, as it can be seen here:
but this exception is stopping me.