Re: save image in figure
- From: "CRet" <c.ret@xxxxxxxxxx>
- Date: Wed, 25 Jan 2006 23:51:20 +0100
"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
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
.
- References:
- save image in figure
- From: Kimo Johnson
- save image in figure
- Prev by Date: Re: a goto command???
- Next by Date: Re: MATLAB CODE FOR IMAGE PROCESSING
- Previous by thread: Re: save image in figure
- Next by thread: Intel vs. AMD processors for Matlab
- Index(es):
Relevant Pages
|
|