I was trying to find a good way of drawing exact rectangles with arbitrary dimensions, came up with this, and decided to share it in case it's useful to anyone. The block for drawing a rectangle is in the first sprite, and if you run the project it lets you enter parameters to draw a rectangle or draw an example image using pixels with the dimensions of your choice. The only limitation is that you can't make a 1-width rectangle, since there isn't any way in that case to cover up the weird extra bits that size 1 pen creates. (Though technically the block in this project could probably be modified to work for anything other than a 1x1 rectangle by swapping x and y when the width is 1.) You can confirm that the rectangles are exact by taking a screenshot or saving a picture of the stage; if you zoom in, the rectangles should solid blocks of color, without any blending of pixels on the edges.
Updated version for 3.0 here: https://scratch.mit.edu/projects/288864486/