fix tile image
This commit is contained in:
parent
48706c35f9
commit
6ad5ceebc6
|
@ -50,8 +50,8 @@ pub fn add_tiles(game_data: String, image: String, prefix: String) -> String {
|
|||
for row in 0..rows {
|
||||
let mut pixels = Vec::with_capacity(64);
|
||||
|
||||
for x in (column * SD)..((column + 1) * SD) {
|
||||
for y in (row * SD)..((row + 1) * SD) {
|
||||
for y in (row * SD)..((row + 1) * SD) {
|
||||
for x in (column * SD)..((column + 1) * SD) {
|
||||
let pixel = image.get_pixel(x, y).to_rgb();
|
||||
let total: u32 = (pixel[0] as u32 + pixel[1] as u32 + pixel[2] as u32) as u32;
|
||||
// is each channel brighter than 128/255 on average?
|
||||
|
|
Loading…
Reference in New Issue