Re: save image in figure




"Kimo Johnson" <kimo.johnson@xxxxxxxxxxxxx> wrote in
news:ef26a32.-1@xxxxxxxxxxxxxxxxxxx
> [...]
> I
> know the image size I want (2048 x 2048) and I don't want any of the
> white (or gray) space that matlab prints by default. I only want
> what is in the image and line at full resolution.
>

I have not try it yet, but did you try the samething like
orient tall
print

If you want to carefully control size and print position to get full
resolution, you may have to adjust the 'PaperUnits', 'PaperOrientation',
'PaperPosition', 'PaperPositionMode', 'PaperSize' and 'PaperType' properties
to fit your hardware.

If you wisch to create an *.tif image file, then I may suggest you to use
function such as imwrite. Of course, you have then to incorporate the black
line into the im matrix. This may not be done by eventually additing the 'k'
color in the colormap and then to modify im to the 'k' colormap key.

For exemple (of course there is other possibilities)
% Initiate image attribut
im=uint8(256*rand(2048));
map=rand(255,3);
imagesc(im);
colormap(map);

% Add the black line of Width 2
k=find(~sum(map,2)); % check if black already exist in colormap
if isempty(k), map=[map;0 0 0 ];k=size(map,1);end
% if no 'k' create a new color key
for i=1:1000;im(i:i+1;i:i+1)=k;end

% Update figure to check for result (note that only a part of the 2048
pixels are actually draw due to figure size
% making the black line not easy see (on my system I have to zoom in)
image(im);
colormap(map);

% Write the TIF file
imwrite(im,map,'test.tif','tiff')

Note that displaying the image in a figure is not necessary.

Hope this help
C.Ret



.



Relevant Pages

  • cant get desired xorg resolution with FreeBSD 7.0
    ... FreeBSD 6.2 with Xorg 7.2 using a 1024x768 resolution. ... number of screens: 1 ... default number of colormap cells: ... number of visuals: 17 ...
    (comp.unix.bsd.freebsd.misc)
  • Re: Screen resolution
    ... Is there a way to check up the real performed resolution? ... depth of root window: 24 planes ... default number of colormap cells: ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: Screen resolution
    ... Is there a way to check up the real performed resolution? ... depth of root window: 24 planes ... default number of colormap cells: ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: Screen resolution
    ... Is there a way to check up the real performed resolution? ... vertical refresh rates for the screen/monitor. ... default number of colormap cells: ... I'm new with debian and still don't handle very well the installation debian ...
    (Debian-User)