Microarrays provide a simple way to measure the level of hybridization of known probes of interest with one or more samples under different conditions. The rapid development of microarray technology requires the implementation of smart and flexible algorithms to deal either with the great amount of data or with the variations of the used hardware. In this paper, a generalized methodology for spot addressing and gridding of microarray images is presented. The methodology can cope with both rectangular and hexagonal grids, which are used for the probes placement onto the substrate. Initially, the methodology identifies the structure of the image, and an efficient spot-by-spot approach has been developed for the detection of all spots in the image. The evaluation of the methodology was performed using both rectangular and hexagonal structured images, merged in a single dataset. The methodology results in high accuracy in the spots detection, ranging from 92.8 to 99.8 % depending on the dataset used.