Path: news.mathworks.com!not-for-mail
From: "Robert Johansson" <robert.nospam@math.umu.se>
Newsgroups: comp.soft-sys.matlab
Subject: Re: reading gif
Date: Tue, 6 May 2008 19:56:03 +0000 (UTC)
Organization: Ume&#229;
Lines: 76
Message-ID: <fvqd4j$5bc$1@fred.mathworks.com>
References: <fvl2ih$khs$1@fred.mathworks.com> <muyzlr3gsuu.fsf@G99-Boettcher.llan.ll.mit.edu>
Reply-To: "Robert Johansson" <robert.nospam@math.umu.se>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1210103763 5484 172.30.248.37 (6 May 2008 19:56:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 6 May 2008 19:56:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1129354
Xref: news.mathworks.com comp.soft-sys.matlab:467000


Peter Boettcher <boettcher@ll.mit.edu> wrote in message 
<muyzlr3gsuu.fsf@G99-Boettcher.llan.ll.mit.edu>...
> "Robert Johansson" <robert.nospam@math.umu.se> writes:
> 
> >> What?  You really need to explain what you mean 
by "not enough to
> >> describe it", or "not even close to what is needed to 
get a correct
> >> version of".  Everything seems entirely consistent.  
The image has
> >> size 101x101 pixels.  It is displayed at exactly that 
size on the
> >> web.  Windows "properties" says it is 101x101 pixels.  
When you read
> >> it into MATLAB you get a matrix of 101x101 pixels.
> >> 
> >> And when I display the 101x101 matrix in MATLAB, it 
looks exactly
> >> like the web.
> >> 
> >> Maybe the code you use to display the image is wrong?  
Here's what I
> >> did:
> >> 
> >> [s map] = imread('UMU_pos.gif');
> >> image(s);
> >> colormap(map);
> >> truesize;
> >> 
> >> 
> >> 
> >> -Peter
> >
> > I'm sorry if my explanation was poor. If I do the 
conversion to eps
> > with my own code, or with your code, I get a new 
picture of poor
> > quality. I scaled the eps with LaTeX to exactly the 
same size as the
> > original (20mm) and put them side by side to be sure. 
There is no
> > doubt that something has been lost or distorted. Maybe 
this is a
> > problem with conversion from gif to eps that can't be 
avoided with
> > this method? I was just surprised that I didnt get the 
same result
> > when I read the gif-file and converted it with MATLAB.
> 
> OK, that's a different issue.  Raster formats in EPS can 
be... tricky.
> What code are you using to generate the EPS file?  And 
how are you
> comparing the output results to the GIF version?
> 
> -Peter

Thanks, thats nice to know. I have tried many different 
approaces. The most promising is this one

function logo(storlek)

[s map] = imread('UMU_pos.gif');
image(s);
colormap(map);
set(gcf,'units','points','position',[0 0 storlek 
storlek],'color',[0 0 0])
axes('units','points','position',[0 0 storlek 
storlek],'visible','off')

end

but it doesn't work properly. I realize that 20 mm is 
probably wrong size. I got it from the webbpage where I 
found the gif. I thouth it should be right if I ran my 
function with storlek=101 ... but its not right.