Dimensions define the image
Width and height set the generated pixel grid, not an aspect-ratio hint. A 4 by 2 request has 4 columns and 2 rows, for 8 pixels total. Changing only one dimension changes both the image size and its aspect ratio. The tool does not need an existing image because the colored area is created from the selected settings.