MathGroup Archive 2010

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

Search the Archive

Re: overimpose graphics on an imported image

  • To: mathgroup at
  • Subject: [mg106121] Re: [mg106104] overimpose graphics on an imported image
  • From: Patrick Scheibe <pscheibe at>
  • Date: Sat, 2 Jan 2010 05:04:14 -0500 (EST)
  • References: <>


tell Mathematica about your plotting-range: 

img = Import["";];
{nx, ny} = ImageDimensions[img];
ImageCompose[img, {Graphics[{Red, Rectangle[{0, 0}, {nx/2, ny/2}]}, 
   PlotRange -> {{0, nx}, {0, ny}}], 0.5}]


On Fri, 2010-01-01 at 05:37 -0500, alexxx.magni at wrote:
> hi people,
> I wonder if it is just me being dumb, but I'm unable to perform what I
> thought was a very simple operation:
> having imported an image of (Lx,Ly) pixels, draw above it an empty
> rectangle at coordinates (x0,y0) (x1,y1) (say, lower left and upper
> right corners).
> Say for example that I want to overimpose on image i1 a rectangle
> covering a 10% portion, if I use this:
> ImageCompose[i1, Graphics[Rectangle[{0, 0}, {0.1*Lx, 0.1*Ly}]]]
> I have (apart from a filled rectangle instead of empty, but I can deal
> with it later)
> a huge rectangle covering all of it!
> How these coordinates interact?
> Thanks for any help...
> Alessandro Magni

  • Prev by Date: Re: Question about the derivative of Abs
  • Next by Date: Re: Uninstalling/Reinstalling Mathematica 7?
  • Previous by thread: overimpose graphics on an imported image
  • Next by thread: Re: overimpose graphics on an imported image