International audienceTopology preservation is a property of affine transformations in ${\mathbb R^2}$, but not in $\mathbb Z^2$.In this article, given a binary object $\mathsf X \subset \mathbb Z^2$ and an affine transformation ${\mathcal A}$, we propose a method for building a binary object $\widehat{\mathsf X} \subset \mathbb Z^2$ resulting from the application of ${\mathcal A}$ on $\mathsf X$.Our purpose is, in particular, to preserve the homotopy type between $\mathsf X$ and $\widehat{\mathsf X}$.To this end, we formulate the construction of $\widehat{\mathsf X}$ from $\mathsf X$ as an optimization problem in the space of cellular complexes, and we solve this problem under topological constraints.More precisely, we define a cellular sp...