Prev: Fast access to rows and columns of sparse matrices
Next: Solving 2 non linear equations with 2 unknown
From: Walter Roberson on 23 May 2010 23:03 Md. Niazul wrote: > when i use the plot() function ,it generates a plot named for example' > Figure 1'. how can i use it in imwrite ().??? pls help...thanx saveas(1,FileName, 'gif')
From: Md. Niazul on 24 May 2010 05:04 "Md. Niazul " <niaz.eee04(a)gmail.com> wrote in message <htap3a$bhg$1(a)fred.mathworks.com>... > Walter Roberson <roberson(a)hushmail.com> wrote in message <V8%Jn.14558$Gx2.9413(a)newsfe20.iad>... > > Md. Niazul wrote: > > > i have to save a mtalab genertaed imagae to a specific location in GIF > > > format. can u help pls.thanx > > > > Specify the full pathname when you write out the GIF using imwrite() . > > You can also specifically tell it to use GIF format (e.g., in case the > > user input a filename that did not end in .gif ) > > thank you roberson..i want to give the location from save tool box(pop-up window)..how can i do that using imwrite? thanx..but when i use the function as saveas(1,'filename','gif') ,it shows a error like this: ??? Error using ==> saveas at 156 Unsupported format or extension: gif but i dot have eror with other format like EMF .can u pls give me a solution.. i need GIF format.thanx
From: ImageAnalyst on 24 May 2010 11:11 Upgrade your version of MATLAB. My help says: "Graphics and 3-D Visualization, MATLAB Version 7.0.4 (R14SP2) This version introduces the following new feature: imwrite Now Supports GIF Export The imwrite function now supports exporting image data in Graphics Interchange Format (GIF). "
From: Walter Roberson on 24 May 2010 11:18 Md. Niazul wrote: > thanx..but when i use the function as saveas(1,'filename','gif') ,it > shows a error like this: > > ??? Error using ==> saveas at 156 > Unsupported format or extension: gif > > but i dot have eror with other format like EMF .can u pls give me a > solution.. i need GIF format.thanx F = getframe(1); imwrite(F.cdata, filename, 'gif') Note, though, that you have asked to save the entire figure, and the figure includes the menus and all. If you just want to save the plot area, then instead of passing the 1 to getframe, pass the handle of axes you want to write out.
From: Walter Roberson on 24 May 2010 11:25 ImageAnalyst wrote: > Upgrade your version of MATLAB. My help says: > > "Graphics and 3-D Visualization, MATLAB Version 7.0.4 (R14SP2) > > This version introduces the following new feature: > imwrite Now Supports GIF Export > > The imwrite function now supports exporting image data in Graphics > Interchange Format (GIF). " Yes, but it does turn out that saveas() does not support gif, and the original poster is starting with a figure, not with an array such as is required by imwrite(). saveas() saves figures or axes but doesn't support the needed format. getframe() can do the needed conversion from figure (or axes) to array. *Why* the original poster wants to use the obsolete GIF format is unknown to me, especially as the original poster is not creating a GIF animation...
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: Fast access to rows and columns of sparse matrices Next: Solving 2 non linear equations with 2 unknown |