Sample JavaScript image transformation