little changes on image clipping

Signed-off-by: Luiz Carlos Cavalcanti <cavalcanti.luiz@gmail.com>
Added standalone linear interpolation

Signed-off-by: Luiz Carlos Cavalcanti <cavalcanti.luiz@gmail.com>