The title pretty much says it all.
One possible point of confusion is that this question is not limited to items with head Image
.
I don't know what is the official terminology for what I'm referring to, but I can describe it operationally: if I click on a "graphic-type" (Graphics
, Graphics3D
, Image
, etc.) thingie being displayed by the front end, usually1 an orange outline appears around it, featuring "drag handles" at its corners and mid-sides. My question here is: how can I get the current, actual image size of such a thing?
Also, I'm not interested in ways to answer this question that rely on deducing this size from knowledge of the default behaviors of the code that produced the output. Rather, I'm looking for a method that somehow interrogates the actual item shown on the screen.
1 One exception is the output of, say, GraphicsGrid
, which, depending on where one clicks on it, can get a thick gray outline around the whole grid, or an orange outline around the content of an individual cell.
Predictions`getImageSize
give what you need? $\endgroup$Predictions`getImageSize[graphic]
is equivalent to well-documentedRasterize[graphic, "RasterSize"]
(as can be found by looking at theDefinition
ofPredictions`getImageSize
). $\endgroup$Predictions
getImageSize` won't work if Suggestions Bar is disabled. $\endgroup$