This research paper proposes a unique optimal tone-mapping technique for high dynamic range (HDR) images, performing local adjustments with overlapping windows covering complete image. A local linear adjustment is applied on each window to preserve the radiance values. This problem may be treated as global optimization problems to satisfy the local restriction for every overlapping window. These Local constraints may be considered as a guidance map to suppress high contrast without losing its details. M-estimation technique may be used for solving this optimization problem. This technique may be applied to HDR images with sudden radiance changes or comparatively smooth transitions. Further, this technique may be applied to differentiate and analyzes HDR images from LDR images. Simulation results are included to support the performance gains achieved by the proposed technique.