When I use the figure environment to set an image as a float in a separate page ([p] specifier), I want to be able to use up the full text height, so that the image and its caption are precisely alligned with text on the adjacent page. I want to have captions at the bottom. This means I need to set the image height to \textheight MINUS the height of the caption that comes after.
I am aware of question: How to define a figure size so that it consumes the rest of a page? and the solution offered there works in continuous text, but not in the figure environment.
I was also made aware of question Height of figure + caption textheight, which comes very close to what I need, except I think that having to set the number of lines in a caption manually is a little awkward, and I am looking for a completely automatic way of computing the caption height.
