private float getSource ( float dest , float destMin , float srcMin , float ratio ) { float destDistance = dest - destMin ; float srcDistance = destDistance * ratio ; float ySource = srcMin + srcDistance ; return ySource ; }
Determine the source pixel location