Rasterize off by one pixel
- To: mathgroup at smc.vnet.net
- Subject: [mg100441] Rasterize off by one pixel
- From: swiftset <swiftset at gmail.com>
- Date: Thu, 4 Jun 2009 03:32:02 -0400 (EDT)
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.