Re: How to stretch a image
- To: mathgroup at smc.vnet.net
- Subject: [mg96539] Re: [mg96516] How to stretch a image
- From: Chris Hill <chill at wolfram.com>
- Date: Mon, 16 Feb 2009 06:55:07 -0500 (EST)
- References: <200902150821.DAA07940@smc.vnet.net>
At 02:21 AM 2/15/2009, goodhei8 at gmail.com wrote:
>such as the size of a image is 100 x 100, I want to make it stretch to
>200 x 600 (not 1:1). Mathematica give me 200x200 +200x400 blank. I tried
>Padding and Margins, no working : (
>
>PS, in Mathematica 6.
>Thanks in advance.
Use the AspectRatio option with the ImageSize option to stretch the
image to the desired dimensions:
With[{w = 200, h = 600},
Graphics[Disk[], AspectRatio -> h/w, ImageSize -> {w, h}]]
Chris Hill
Wolfram Research
- References:
- How to stretch a image
- From: "goodhei8@gmail.com" <goodhei8@gmail.com>
- How to stretch a image