|
Richard Quist <rquist@mathworks.com> wrote in message
<fgciil$i49$1@fred.mathworks.com>...
> Yoav Rubin wrote:
> > Richard Quist <rquist_nospam@mathworks.com> wrote in message
> > <fga8jd$f7v$1@fred.mathworks.com>...
> >> Yoav Rubin wrote:
> >>> Hi All,
> >>> I am printing a figure that has in it an image to a tiff
> >>> file, and it seems that for large images, the created
image
> >>> file holds within it only about the first 960 lines in an
> >>> image e.g., if the image is 512 x 2000, the created tiff
> >>> file is 512 x 960, is there a way to change this behavior?
> >>>
> >>> thanks
> >>> Yoav
> >> Are you saying that the output is truncated so that you're
> > missing some
> >> portion of the figure in the output, or is the issue that
> > the output has
> >> been scaled down (so you see the full figure, but it's
> > been compressed
> >> to a smaller size)?
> >>
> >> It would be helpful to know how you're printing the figure
> > (if from the
> >> command line, what is the exact command you're using), and
> > what the
> >> values of the figure's paperposition, paperpositionmode,
> > paperunits
> >> properties are.
> >>
> >> --
> >>
> >> Richard Quist
> >> Software Developer
> >> The MathWorks, Inc.
> >
> > Richard,
> >
> > I am missing a portion of the image(actually most of the
> > image is missing - it should be around 6000x512). I tried to
> > do it either from the command line with the command:
> > print(tmpFigHandle, '-dtiffn',
> > '-r0','-noui','-loose','im.tiff');
> > where the only property is setted is the PaperPositionMode
> > to be auto.
> > I also tried from the figure's window file->print but the
> > result was exactly the same.
> >
> > Thanks
> >
> > Yoav
>
> What release and platform are you running on?
>
> Using r2007b (MATLAB 7.5) on windows I tried a sample
picture that was
> 9792 x 6528, set the figure to be that same size, set the
axes position
> to fill the figure ([0 0 1 1]) and printed using your
command. There
> were some "windows resources" warnings when I created and
printed the
> large figure but it printed just fine. Here's the code I used:
> imgxlarge = imread('xlarge.jpg');
> fpos = [0 0 size(imgxlarge,1) size(imgxlarge,2)];
> tmpFigHandle = figure('paperpositionmode', 'auto');
> image(imgxlarge);
> set(gca, 'position', [0 0 1 1]);
> axis off;
> drawnow;
> % print at a "normal" figure size
> print(tmpFigHandle, '-dtiffn',
'-r0','-noui','-loose','small1.tiff');
> set(tmpFigHandle, 'position', fpos);
> drawnow;
> % with larger figure sizes it sometimes takes an extra
'nudge'
> set(tmpFigHandle, 'position', fpos);
> % print at the big figure size
> print(tmpFigHandle, '-dtiffn',
'-r0','-noui','-loose','im1.tiff');
>
>
>
>
>
> --
> Rich Quist
> x7895
Hi Richard,
Thanks, the extra nudge did the trick
|