Reverse Android multiplication of color values per the alpha channel

Property definitions

android :: load_image $ NativeCByteArray :: unmultiply
	# Reverse Android multiplication of color values per the alpha channel
	private fun unmultiply(w, h: Int) `{
		int offset = 0;
		int x, y;
		for (x = 0; x < w; x ++)
			for (y = 0; y < h; y ++) {
				unsigned char a = self[offset+3];
				if (a != 0 && a != 0xFF) {
					self[offset] = self[offset] * 256 / a;
					self[offset+1] = self[offset+1] * 256 / a;
					self[offset+2] = self[offset+2] * 256 / a;
				}
				offset += 4;
			}
	`}
lib/android/load_image.nit:87,2--101,3

gamnit :: android19 $ NativeCByteArray :: unmultiply
	# The data was not premultiplied, don't unmultiply it
	redef fun unmultiply(w, h) do end
lib/gamnit/android19.nit:44,2--45,34