0
的颜色深度,我想,以减少特定图像的颜色深度在我的MIPS代码使用此项功能:减少MIPS的
quantize:
#a0 - Bildadresse
#a1 - Höhe | height
#a2 - Breite | width
#a3 - n
move $t0 , $a0
move $t1 , $a1
move $t2 , $a2
move $t3 , $a3
li $t5 , 0
li $t7 , 0
mul $t8 , $t1, $t2
li $t9 , 2
while:
beq $t7, $t8, end_while
lb $t6 , 0($t0)
#andi $t6, $t6, 0x0F
while_pot:
beq $t5 , $t3, end_while_pot
div $t6 , $t9
mflo $t6
addi $t5, $t5 , 1
j while_pot
end_while_pot:
sb $t6 , random($t7)
addi $t0 , $t0 , 1
addi $t7 , $t7 , 1
j while
end_while:
la $s7, random
jr $ra
我有2^n个字节,但即时通讯刚刚起步,以减少深度有些混乱。
结果:Result
原始图片:original
做我有什么错误的,这是减少宽度的正确方法? 如果我需要的东西,以增加对你的了解,请直接告诉我
泰对你有所帮助:d
嘿,是他们的其他东西,我需要改变我的代码?或者这是Mike的工作?我问这是因为Ehen我改变THW深度从255到64没有任何变化 – Testrax