Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

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

Search the Archive

Re: Precise bitmaps

  • To: mathgroup at smc.vnet.net
  • Subject: [mg96713] Re: Precise bitmaps
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Sun, 22 Feb 2009 00:33:58 -0500 (EST)
  • References: <gnq6ni$83g$1@smc.vnet.net>

Hi,

circ = Graphics[Circle[{0, 0}, 62]];
img = Rasterize[circ, ImageSize -> {128, 128}];

and

ImageDimensions[img]

gives

{128, 128}

Regards
   Jens

Diamond, Mark wrote:
> A question was asked back in 2005 about precise bitmaps. I have a similar 
> question with regard to Mathematica version 7.
> 
> Looking at the new image-manipulation functions in V7, I expected this to be 
> quick ... I'd like to be able to create a series of stimuli for use in an 
> experiment. The first step in creating the stimuli is to create a 512 x 512 
> greyscale image with a white background and which contains the drawn 
> objects.
> 
> I tried the following to create a JPEG image with dimensions 128x128 ...
> 
> circ=Graphics[Circle[{0,0},62]]
> rasterCirc=Rasterize[circ,RasterSize->{128,128}]
> Export["circle.jpg",rasterCirc]
> 
> but instead the image dimensions are 360 x 363 pixels. I had also hoped that 
> I could obtain an antialiased arc but the only antialiasing option seems to 
> be for Style, which then produces a non-Graphics object.
> 
> Can anyone see a simple (i.e., not very low-level programming) solution to 
> the problem within Mathematica? What have I missed conceptually that would 
> explain the 360x363 pixel dimensions instead of my expected 128x128? And is 
> there a way to obtain the anti-aliased circle?
> 
> Cheers,
> 
> Mark Diamond
> 
> 
> 


  • Prev by Date: FullGraphics of Graphics3D
  • Next by Date: question related to (-1)^(1/3)
  • Previous by thread: Re: FullGraphics of Graphics3D
  • Next by thread: Re: Precise bitmaps