Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #2797 > unrolled thread
| Started by | neuromanthic <kolbasa.sapiens@gmail.com> |
|---|---|
| First post | 2011-05-30 10:36 +0000 |
| Last post | 2011-06-01 08:34 +0000 |
| Articles | 4 — 3 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
Export["...",...,"GIF"] results in nonreadable gif file neuromanthic <kolbasa.sapiens@gmail.com> - 2011-05-30 10:36 +0000
Re: Export["...",...,"GIF"] results in nonreadable gif file "Nasser M. Abbasi" <nma@12000.org> - 2011-05-31 11:47 +0000
Re: Export["...",...,"GIF"] results in nonreadable gif file Roman Bortnikov <kolbasa.sapiens@gmail.com> - 2011-06-01 08:31 +0000
Re: Export["...",...,"GIF"] results in nonreadable gif file Roman Bortnikov <kolbasa.sapiens@gmail.com> - 2011-06-01 08:34 +0000
| From | neuromanthic <kolbasa.sapiens@gmail.com> |
|---|---|
| Date | 2011-05-30 10:36 +0000 |
| Subject | Export["...",...,"GIF"] results in nonreadable gif file |
| Message-ID | <irvrum$8kr$1@smc.vnet.net> |
I've expirienced some problems with exporting images and graphics to
gif and animated gif's with Export[]. Here are inputs for exporting
lists of graphics as well as images
In[138]:= Export["E:\\work\\projects\\anim2.gif",
Table[Graphics@
Raster@Table[
k - (i + j), {j, 0, 0.5, 0.05}, {i, 0., 0.5, 0.05}], {k, 0, 1,
0.1}], "GIF"]
Out[138]= "E:\\work\\projects\\anim2.gif"
==========================
In[148]:= Export["E:\\work\\projects\\anim4.gif",
Table[Image@
Table[k - (i + j), {j, 0, 0.5, 0.05}, {i, 0., 0.5, 0.05}], {k, 0,
1, 0.1}], "GIF"]
Out[148]= "E:\\work\\projects\\anim4.gif"
The arguments of exports are evaluated and shown properly, but
resulting output files are corrupted and unreasoonably small (390
bytes)
On the other hand selecting an image in frontend and choosing "Save
Image As..." to save as gif works just fine. However, I need to make
animated gifs and this trick doesn't help.
Is it a bug in GIF converter or what?
Any advice would be appreciated.
[toc] | [next] | [standalone]
| From | "Nasser M. Abbasi" <nma@12000.org> |
|---|---|
| Date | 2011-05-31 11:47 +0000 |
| Message-ID | <is2kgq$qp4$1@smc.vnet.net> |
| In reply to | #2797 |
On 5/30/2011 3:36 AM, neuromanthic wrote:
> I've expirienced some problems with exporting images and graphics to
> gif and animated gif's with Export[]. Here are inputs for exporting
> lists of graphics as well as images
>
> In[138]:= Export["E:\\work\\projects\\anim2.gif",
> Table[Graphics@
> Raster@Table[
> k - (i + j), {j, 0, 0.5, 0.05}, {i, 0., 0.5, 0.05}], {k, 0, 1,
> 0.1}], "GIF"]
>
> Out[138]= "E:\\work\\projects\\anim2.gif"
>
> ==========================
>
> In[148]:= Export["E:\\work\\projects\\anim4.gif",
> Table[Image@
> Table[k - (i + j), {j, 0, 0.5, 0.05}, {i, 0., 0.5, 0.05}], {k, 0,
> 1, 0.1}], "GIF"]
>
> Out[148]= "E:\\work\\projects\\anim4.gif"
>
> The arguments of exports are evaluated and shown properly, but
> resulting output files are corrupted and unreasoonably small (390
> bytes)
>
> On the other hand selecting an image in frontend and choosing "Save
> Image As..." to save as gif works just fine. However, I need to make
> animated gifs and this trick doesn't help.
>
>
> Is it a bug in GIF converter or what?
> Any advice would be appreciated.
>
try this, it worked for me:
v = Table[Graphics@Raster@Table[
k - (i + j), {j, 0, 0.5, 0.05}, {i, 0., 0.5, 0.05}],
{k, 0, 1,0.1}
];
Export["anim.gif",a,"DisplayDurations"->.5]
--Nasser
[toc] | [prev] | [next] | [standalone]
| From | Roman Bortnikov <kolbasa.sapiens@gmail.com> |
|---|---|
| Date | 2011-06-01 08:31 +0000 |
| Message-ID | <is4tdd$b18$1@smc.vnet.net> |
| In reply to | #2821 |
Still no clue, what's going on... Import["file.gif"] works fine I'm running Win7 sp1 (updated recently but can't remember last time export worked properly before) Mathematica 8.0.0 (I guess I successfully did gif export in m8.0.0 before but I may be wrong) and frustrated. --Roman
[toc] | [prev] | [next] | [standalone]
| From | Roman Bortnikov <kolbasa.sapiens@gmail.com> |
|---|---|
| Date | 2011-06-01 08:34 +0000 |
| Message-ID | <is4tjd$b69$1@smc.vnet.net> |
| In reply to | #2821 |
On 31 =D0=BC=D0=B0=D0=B9, 15:47, "Nasser M. Abbasi" <n...@12000.org> wrote:
> On 5/30/2011 3:36 AM, neuromanthic wrote:
>
>
>
>
>
>
>
>
>
> > I've expirienced some problems with exporting images and graphics to
> > gif and animated gif's with Export[]. Here are inputs for exporting
> > lists of graphics as well as images
>
> > In[138]:= Export["E:\\work\\projects\\anim2.gif",
> > =C2 Table[Graphics@
> > =C2 =C2 Raster@Table[
> > =C2 =C2 =C2 k - (i + j), {j, 0, 0.5, 0.05}, {i, 0., 0.5, 0.05}=
], {k, 0, 1,
> > =C2 =C2 0.1}], "GIF"]
>
> > Out[138]= "E:\\work\\projects\\anim2.gif"
>
> > ========================
===
>
> > In[148]:= Export["E:\\work\\projects\\anim4.gif",
> > =C2 Table[Image@
> > =C2 =C2 Table[k - (i + j), {j, 0, 0.5, 0.05}, {i, 0., 0.5, 0.05}]=
, {k, 0,
> > =C2 =C2 1, 0.1}], "GIF"]
>
> > Out[148]= "E:\\work\\projects\\anim4.gif"
>
> > The arguments of exports are evaluated and shown properly, but
> > resulting output files are corrupted and unreasoonably small (390
> > bytes)
>
> > On the other hand selecting an image in frontend and choosing "Save
> > Image As..." to save as gif works just fine. However, I need to make
> > animated gifs and this trick doesn't help.
>
> > Is it a bug in GIF converter or what?
> > Any advice would be appreciated.
>
> try this, it worked for me:
>
> v = Table[Graphics@Raster@Table[
> =C2 =C2 =C2 =C2 =C2 =C2 k - (i + j), {j, 0, 0.5, 0.05}, =
{i, 0., 0.5, 0.05}],
> =C2 =C2 =C2 =C2 =C2 =C2 {k, 0, 1,0.1}
> =C2 =C2 =C2 ];
>
> Export["anim.gif",a,"DisplayDurations"->.5]
>
> --Nasser
To Nasser:
That didn't work. Result was the same, 390 bytes of nonreadable gif.
Interestingly, exported corrupted gifs all give on Import[] the
following output:
======================
In:=
v = Image@Graphics@Raster[Table[i + j, {i, 0, 0.5, 0.1}, {j, 0, 0.5,
0.1}]];
Export["E:\\work\\projects\\anima12.gif", v];
Import["E:\\work\\projects\\anima12.gif"]
======================
During evaluation of In[291]:= Image::imgarray: The specified argument
{} should be an array of rank 2 or 3 with machine-sized numbers. >>
During evaluation of In[291]:= ImageDimensions::imginv: Expecting an
image or graphics instead of Image[{},Byte,ColorSpace->RGBColor]. >>
During evaluation of In[291]:= ImageCompose::imginv: Expecting an
image or graphics instead of Image[{},Byte,ColorSpace->RGBColor]. >>
During evaluation of In[291]:= ImageDimensions::imginv: Expecting an
image or graphics instead of ImageCompose[Image[{},Byte,ColorSpace-
>RGBColor],Image[{},Byte,ColorSpace-
>RGBColor],System`ConvertersDump`GIFCalculateOverlayPosition[ImageDimension=
s[Image[{},Byte,ColorSpace-
>RGBColor]],ImageDimensions[Image[{},Byte,ColorSpace->RGBColor]],
{0,0}]]. >>
During evaluation of In[291]:= ImageRotate::imginv: Expecting an image
or graphics instead of ImageCompose[Image[{},Byte,ColorSpace-
>RGBColor],Image[{},Byte,ColorSpace-
>RGBColor],System`ConvertersDump`GIFCalculateOverlayPosition[ImageDimension=
s[Image[{},Byte,ColorSpace-
>RGBColor]],ImageDimensions[Image[{},Byte,ColorSpace->RGBColor]],
{0,0}]]. >>
======================
Out=
ImageRotate[
ImageCompose[Image[{}, "Byte", ColorSpace -> RGBColor],
Image[{}, "Byte", ColorSpace -> RGBColor],
System`ConvertersDump`GIFCalculateOverlayPosition[
ImageDimensions[Image[{}, "Byte", ColorSpace -> RGBColor]],
ImageDimensions[Image[{}, "Byte", ColorSpace -> RGBColor]], {0,
0}]], Top -> Top]
======================
Does anyone have an idea of what's wrong with my Export?
Roman Bortnikov
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web