def image_extents(product, geotransform, step=1):
    """Get the corner coordinates from the opened raster.

    Fetches a list of latitude and longitude values for the boundary
    of a given satellite product with a given pixel step along
    the border.

    :param product: the opened Gdal dataset
    :type product: osgeo.gdal.Dataset
    :param geotransform: the raster's geotransform information
    :type geotransform: tuple
    :param step: the step size in pixels
    :type step: int, optional
    :return: a list containing the boundary coordinates
    :rtype: list
    """
    # Get Dem product size
    size = product.RasterXSize, product.RasterYSize

    # Set empty extent file and retrieve lat/lon values
    ext = []
    xarr = [0, size[0]]
    yarr = [0, size[1]]

    for px in xarr:
        for py in yarr:
            x = geotransform[0] + (px * geotransform[1]) +\
                (py * geotransform[2])
            y = geotransform[3] + (px * geotransform[4]) +\
                (py * geotransform[5])
            ext.append((x, y))
        yarr.reverse()

    return ext