Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

incorrect display for Export[Image[]]

1 view
Skip to first unread message

divisor

unread,
Nov 15, 2009, 5:59:45 AM11/15/09
to
Hello MathGroup:

Here is a simple command to create an Image[]:

Image@Table[
With[{z = x + I y},
With[{w = (1 + z + z^2 + z^3)/(1 + z + z^2)}, {Re[w],
Im[w]}]], {x, -1, 1, 0.01}, {y, -1, 1, 0.01}]

It displays correctly in Mathematica. Then I attempt to Export[] this image
with:

Export["e:\\t111409A.jpg", %, "JPEG"]

When I look at the image outside of Mathematica, it does not show correctly.
It looks like only the Alpha channel shows. I also tried these other
$ExportFormats:

- GIF
- TIFF

with the same result.

I imagine there is a simple resolution to this problem, but I cannot
find it yet.

Thanks in advance.

Roger Williams
Franklin Laboratory

Nasser M. Abbasi

unread,
Nov 15, 2009, 8:49:27 PM11/15/09
to

"divisor" <congruenti...@yahoo.com> wrote in message
news:hdomv1$98l$1...@smc.vnet.net...

But the image is not an RGB image? becuase there is only 2 channels in the
image as can be seen by looking at the dimensions of the data

im = Image[Table[With[{z = x + I*y},


With[{w = (1 + z + z^2 + z^3)/(1 + z + z^2)},
{Re[w], Im[w]}]], {x, -1, 1, 0.01},

{y, -1, 1, 0.01}]]
d = ImageData[im];
Dimensions[d]

{201, 201, 2}

--Nasser


divisor

unread,
Nov 17, 2009, 5:23:54 AM11/17/09
to
Thanks Nasser...

what you wrote makes sense but blue definitely shows up in the image,
even though R=data, G=data, B=no data.

Also I guess I would think that an Export[]ed file would show the same
as what I see on the screen in Mathematica. Finally, I would have thought that
I could just Graphics@Image@....

Ohh well, I will just keep digging....

Regards..RogerW

On Nov 15, 5:49 pm, "Nasser M. Abbasi" <n...@12000.org> wrote:

> <snipped/>


>
> But the image is not an RGB image? becuase there is only 2 channels in the
> image as can be seen by looking at the dimensions of the data
>
> im = Image[Table[With[{z = x + I*y},
> With[{w = (1 + z + z^2 + z^3)/(1 + z + z^2)},
> {Re[w], Im[w]}]], {x, -1, 1, 0.01},
> {y, -1, 1, 0.01}]]
> d = ImageData[im];
> Dimensions[d]
>
> {201, 201, 2}
>

> --Nasser- Hide quoted text -
>
> - Show quoted text -


divisor

unread,
Nov 20, 2009, 6:38:07 AM11/20/09
to
Hello mathGroup:

Here is some more info about this issue:

- 2 workarounds are availble: Rasterize@ or Graphics[{Inset@
- the problem has been reported to and re-created by WRI support

Regards..

Roger Williams
Franklin Laboratory

On Nov 17, 2:23 am, divisor <congruentialumina...@yahoo.com> wrote:
> Thanks Nasser...
>
> what you wrote makes sense but blue definitely shows up in the image,
> even though R=data, G=data, B=no data.
>
> Also I guess I would think that an Export[]ed file would show the same

> as what I see on the screen in Mathematica. Finally, I would have thought=


that
> I could just Graphics@Image@....
>
> Ohh well, I will just keep digging....
>
> Regards..RogerW
>
> On Nov 15, 5:49 pm, "Nasser M. Abbasi" <n...@12000.org> wrote:
>
>
>
> > <snipped/>
>

> > But the image is not an RGB image? becuase there is only 2 channels in =


the
> > image as can be seen by looking at the dimensions of the data
>
> > im = Image[Table[With[{z = x + I*y},
> > With[{w = (1 + z + z^2 + z^3)/(1 + z + z^2)},
> > {Re[w], Im[w]}]], {x, -1, 1, 0.01},
> > {y, -1, 1, 0.01}]]
> > d = ImageData[im];
> > Dimensions[d]
>
> > {201, 201, 2}
>

> > --Nasser- Hide quoted text -
>

> > - Show quoted text -- Hide quoted text -

0 new messages