We present a new method for reconstructing the density function underlying a given histogram. First we analyze the univariate case taking the approximating function in a class of quadratic-like splines with variable degrees. For the analogous bivariate problem we introduce a new scheme based on the Boolean sum of univariate B-splines and show that for a proper choice of the degrees, the splines are positive and satisfy local monotonicity constraints.