Path: news.mathworks.com!newsfeed-00.mathworks.com!panix!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: <muyr6cfgo6x.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:j4/aEXwpXAlQP/9FAt2GfCGjAtY=
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Lines: 44
Date: Tue, 06 May 2008 16:41:42 -0400
NNTP-Posting-Host: 155.34.163.114
X-Complaints-To: news@ll.mit.edu
X-Trace: llnews 1210105862 155.34.163.114 (Tue, 06 May 2008 16:31:02 EDT)
NNTP-Posting-Date: Tue, 06 May 2008 16:31:02 EDT
Xref: news.mathworks.com comp.soft-sys.matlab:467010


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

> Peter Boettcher <boettcher@ll.mit.edu> wrote in message 
> <muyzlr3gsuu.fsf@G99-Boettcher.llan.ll.mit.edu>...

>> 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. 

'points' do not mean 'pixels'.  'points' are related to font sizes.  You
want pixels.

The 'axes' call creates a new axis.  Instead you want to
set(gca, 'units', 'pixels', [0 0 101 101]);

"axis off" is the right way to turn off the hash marks.

I also do not see any code that exports to an EPS.  Printing uses some
other values that you need to get right.  'PaperPosition', the -r value
in the print command to specify printing resolution, etc.

-Peter