1. A computer-implemented method comprising: determining an initial height and an initial width of an image that is associated with a search result, wherein the image is to be displayed in the search result in line with text associated with the search result, and wherein the search result includes an in-line image region for displaying the image in line with the text, and a text region for displaying the text; determining an initial height of the text region of the search result based at least on (i) the text associated with the search result, and (ii) an initial width of the text region; determining an initial width of the in-line image region of the search result based at least on (i) the initial height of the text region of the search result, (ii) the initial height of the image, and (iii) the initial width of the image; determining that a) space in the in-line image region or space in the text region will include undesired whitespace, or b) text associated with the search result and for presentation in the search result will be removed from the text region; and in response to determining that a) space in the in-line image region or space in the text region will include undesired whitespace, or b) text associated with the search result and for presentation in the search result will be removed from the text region: determining an adjusted height of the text region of the search result based at least on the initial width of the in-line image region of the search result; determining an adjusted width of the in-line image region of the search result based at least on the adjusted height of the text region of the search result; determining an adjusted height and an adjusted width of the image based at least on the adjusted width of the in-line image region of the search result; scaling at least a portion of the image based at least on the adjusted height and the adjusted width of the image; and outputting the scaled image for display in the search result in line with the text.
1. A computer-implemented method comprising: determining an initial height and an initial width of an image that is associated with a search result, wherein the image is to be displayed in the search result in line with text associated with the search result, and wherein the search result includes an in-line image region for displaying the image in line with the text, and a text region for displaying the text; determining an initial height of the text region of the search result based at least on (i) the text associated with the search result, and (ii) an initial width of the text region; determining an initial width of the in-line image region of the search result based at least on (i) the initial height of the text region of the search result, (ii) the initial height of the image, and (iii) the initial width of the image; determining that a) space in the in-line image region or space in the text region will include undesired whitespace, or b) text associated with the search result and for presentation in the search result will be removed from the text region; and in response to determining that a) space in the in-line image region or space in the text region will include undesired whitespace, or b) text associated with the search result and for presentation in the search result will be removed from the text region: determining an adjusted height of the text region of the search result based at least on the initial width of the in-line image region of the search result; determining an adjusted width of the in-line image region of the search result based at least on the adjusted height of the text region of the search result; determining an adjusted height and an adjusted width of the image based at least on the adjusted width of the in-line image region of the search result; scaling at least a portion of the image based at least on the adjusted height and the adjusted width of the image; and outputting the scaled image for display in the search result in line with the text. 2. The method of claim 1 , comprising: determining that the initial width of the in-line image region exceeds a maximum in-line image region width, wherein the adjusted height of the text region is further based on the maximum in-line image region width.