                                                                                                                                                                         
    grid = Image.new('RGB', size=(cols*w, rows*h))                                                                                                                                                                                            
                                       