How to realize 2d image rebin process which can be backward?

Hello everyone, I want to rebin a 2D image (N,N) to (N/2,N/2). Is there any differentiable process to realize it?