MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Rasterize off by one pixel


I'm trying to make a 100x100 pixel image using Rasterize, as follows,
where n=100

Rasterize[
  Graphics[Rectangle[{0,0}, {1,1}],
                PlotRange->{{0,2},{0,2}}],
  "Image",
   RasterSize->{n,n}
]

when I check the resulting image using ImageDimensions, the size is
100x101. If I say size {n,n/2}, then the image is 100x51 instead of
100x50.

Any ideas what causes this and how to fix it? Thanks.


  • Prev by Date: Learning Trace more....
  • Next by Date: Problem with a plot in Mathematica
  • Previous by thread: Re: Learning Trace more....
  • Next by thread: Re: Rasterize off by one pixel