RasterSize

RasterSize

is an option for Rasterize and related functions that determines the absolute pixel size of the raster generated.

Details

  • The following settings can be given:
  • wwidth w pixels
    {w,h}explicit pixel width and height
    {{wmax},{hmax}}pixel width and height maximums
    {{wmin,wmax},{hmin,hmax}}pixel width and height ranges
  • With RasterSize->{w,h} a × raster will always be generated, with the rendered object being sized to fit in it.
  • If the object has a definite aspect ratio that is not h/w, then space will be left around it.
  • The position of the object within the × region is determined by the setting for the object's Alignment option.
  • With RasterSize->{{wmax},{hmax}}, an object is sized so that its width and height are as large as possible while not exceeding the specified maximums.
  • No extra space is then left around the object, so that the region in which the object is drawn is always the same shape as the object itself.
  • With RasterSize->{{wmin,wmax},{hmin,hmax}}, the object is sized to be as large as possible while not exceeding specified maximums, with extra space being left if necessary in order to satisfy the minimums.

Examples

open allclose all

Basic Examples  (1)

Set different raster sizes in pixels:

Properties & Relations  (1)

Wolfram Research (2007), RasterSize, Wolfram Language function, https://reference.wolfram.com/language/ref/RasterSize.html.

Text

Wolfram Research (2007), RasterSize, Wolfram Language function, https://reference.wolfram.com/language/ref/RasterSize.html.

CMS

Wolfram Language. 2007. "RasterSize." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/RasterSize.html.

APA

Wolfram Language. (2007). RasterSize. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RasterSize.html

BibTeX

@misc{reference.wolfram_2023_rastersize, author="Wolfram Research", title="{RasterSize}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/RasterSize.html}", note=[Accessed: 18-March-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_rastersize, organization={Wolfram Research}, title={RasterSize}, year={2007}, url={https://reference.wolfram.com/language/ref/RasterSize.html}, note=[Accessed: 18-March-2024 ]}