Path: news.mathworks.com!newsfeed-00.mathworks.com!nntp.TheWorld.com!bloom-beacon.mit.edu!llnews!53ab2750!not-for-mail
From: Peter Boettcher <boettcher@ll.mit.edu>
Newsgroups: comp.soft-sys.matlab
Subject: Re: reading gif
References: <fvl2ih$khs$1@fred.mathworks.com>
Message-ID: <muy4p9bibud.fsf@G99-Boettcher.llan.ll.mit.edu>
Organization: MIT Lincoln Laboratory
User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.0 (gnu/linux)
Cancel-Lock: sha1:IZkZ1f53rIrkXxbpT+grc0R/YYA=
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Lines: 70
Date: Tue, 06 May 2008 13:25:30 -0400
NNTP-Posting-Host: 155.34.163.114
X-Complaints-To: news@ll.mit.edu
X-Trace: llnews 1210094090 155.34.163.114 (Tue, 06 May 2008 13:14:50 EDT)
NNTP-Posting-Date: Tue, 06 May 2008 13:14:50 EDT
Xref: news.mathworks.com comp.soft-sys.matlab:466968



[correcting top-post]

"Robert Johansson" <robert.nospam@math.umu.se> writes:

> Steve Eddins <Steve.Eddins@mathworks.com> wrote in message 
> <fvpn6m$rt6$1@fred.mathworks.com>...
>> Robert Johansson wrote:
>> > The matrix that I get from imread (and importdata) is of size
>> > 87x87, that is not even close to what is needed to get a correct
>> > version of the picture. I know what the picture should look
>> > like. This is the file info:
>> > 
>> >            FileSize: 3464
>> >              Format: 'GIF'
>> >       FormatVersion: '89a'
>> >               Width: 87
>> >              Height: 87
>> >            BitDepth: 8
>> >           ColorType: 'indexed'
>> >     FormatSignature: 'GIF89a'
>> >     BackgroundColor: 0
>> >         AspectRatio: 0
>> >          ColorTable: [256x3 double]
>> >          Interlaced: 'no'
>> > 
>> > If I examine the file properties by right-clicking on it, the
>> > system tells me that the size is given in "points" (87x87). Its a
>> > picture of a logo which i want to use in LaTeX so my idea was to
>> > convert it to eps with MATLAB.

>> Sounds to me like you have a GIF file containing 87 rows and 87
>> pixels, and this is what imread is giving you.  It also sounds to me
>> like the Windows file properties dialog is confirming this for you.
>> 
>> Try reading the image file using some other application if you still
>> have doubts.
>> 
>> Where is your notion of "correct version of the picture" coming from?
>
>
> Its a logotype. 
>
> http://www.umu.se/umu/profil/allmant/logotyp.html
>
> The one to the left is of size 101x101 but a matrix of 
> 101x101 is not enough to describe it. I guess that it has 
> something to do with to file format.

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