Converting BufferedImage pixel data into a readable output?

后端 未结 2 1773
萌比男神i
萌比男神i 2021-01-16 19:06

I\'m trying to make a program to divide the map of an old GBA game into 16x16 tiles, save each tile, and then compare the raw image data of each grabbed tile to another list

2条回答
  •  抹茶落季
    2021-01-16 19:45

    The first thing that comes to mind is that JPG is a lossy format that shouldn't be used for precision pixel graphics, especially at 16x16 resolutions. You shouldn't expect to get the exact same RGB values that you originally wrote to the JPG when you read it back.

    I've successfully used PNG for reference images in unit tests, to compare against generated BufferedImage.

提交回复
热议问题