From: Alessandro on 9 Jul 2010 07:04 I have to admit that I'm really tired with Mathematica's assumption that "Image is not a graphics primitive or directive": I lost track of how many times I received that annoying error, due to this stupid internal dichotomy. At the moment I get the error since I'm trying to set in some way the output of the composition of two images with ImageSize, so I tried: Print[Graphics[ImageCompose[bi, Graphics[Locator[{0, 0}, loc]], {nx/2 - b, ny/2 + a}], ImageSize -> 300]], Seems that I cannot put Graphics around ImageCompose, since the latter returns an image which <sarcasm> as we all know is not a Graphics object... </sarcasm> so how do I use ImageSize? I'll be grateful to anybody who will help me here, but really this kind problem is happening more and more often - I believe that some rethinking of the graphics would be appreciated... thank you alessandro
From: Bob Hanlon on 10 Jul 2010 04:00 Rasterize[imComp, ImageSize -> 300] Magnify[imComp, 2] Bob Hanlon ---- Alessandro <alexxx.magni(a)gmail.com> wrote: ============= I have to admit that I'm really tired with Mathematica's assumption that "Image is not a graphics primitive or directive": I lost track of how many times I received that annoying error, due to this stupid internal dichotomy. At the moment I get the error since I'm trying to set in some way the output of the composition of two images with ImageSize, so I tried: Print[Graphics[ImageCompose[bi, Graphics[Locator[{0, 0}, loc]], {nx/2 - b, ny/2 + a}], ImageSize -> 300]], Seems that I cannot put Graphics around ImageCompose, since the latter returns an image which <sarcasm> as we all know is not a Graphics object... </sarcasm> so how do I use ImageSize? I'll be grateful to anybody who will help me here, but really this kind problem is happening more and more often - I believe that some rethinking of the graphics would be appreciated... thank you alessandro
From: Alessandro on 10 Jul 2010 03:58 On 9 Lug, 13:04, Alessandro <alexxx.ma...(a)gmail.com> wrote: > I have to admit that I'm really tired with Mathematica's assumption that > "Image is not a graphics primitive or directive": > I lost track of how many times I received that annoying error, due to > this stupid internal dichotomy. > > At the moment I get the error since I'm trying to set in some way the > output of the composition of two images with ImageSize, so I tried: > > Print[Graphics[ImageCompose[bi, Graphics[Locator[{0, 0}, loc]], > {nx/2 - b, ny/2 + a}], ImageSize -> 300]], > > Seems that I cannot put Graphics around ImageCompose, since the latter > returns an image which <sarcasm> as we all know is not a Graphics > object... </sarcasm> so how do I use ImageSize? > > I'll be grateful to anybody who will help me here, > but really this kind problem is happening more and more often - I > believe that some rethinking of the graphics would be appreciated... > > thank you > > alessandro i=ImageCompose[bi, Graphics[Locator[{0, 0}, loc]], {nx/2 - b, ny/2 + a}], ImageSize -> 300]], Show[i,ImageSize->300] ok, ok... yet I still cannot understand how to correctly mix Show, Graphics, Image and their brothers and sisters... alessandro
From: Patrick Scheibe on 10 Jul 2010 03:59 Hi, <sarcasm> usually I never work with this strange image stuff, so it's no wonder that I never came across this error message.</sarcasm> I personally like to have a difference between an image, which is basically a matrix of values and a graphics, which is in Mathematicas case often a set of lines, points, surfaces, etc in a coordinate system. For an image it is not clear from the start in what coordinate system the matrix lies. That's why the former Graphics[Raster[]] contained a parameter to tell the underlying bounding box. > I'll be grateful to anybody who will help me here, > but really this kind problem is happening more and more often - I > believe that some rethinking of the graphics would be appreciated... Maybe you should consider that there are people who have a different understanding of the underlying paradigm and that it's sometimes better just to ask and not to question the whole idea: img = Import[ "http://felfire.files.wordpress.com/2009/05/sarcasm.jpg"]; gr = DensityPlot[Sin[x]*Sin[y], {x, -Pi, Pi}, {y, -Pi, Pi}, ImageMargins -> None, PlotRangePadding -> None, Frame -> False]; ImageResize[ImageCompose[img, {gr, 0.8}], 150] Hope this helps, Cheers Patrick
|
Pages: 1 Prev: FindMinimum numerical constraint functions Next: 3D view direction |