Dirty but semi-working pixel manipulation