Re: [R] Image from bytes streams

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Tue 16 Aug 2005 - 23:45:02 EST

On Tue, 16 Aug 2005, Márcio de Medeiros Ribeiro wrote:

> First, thank you very much for the answers...
>
> I have used the png() function before for generate the image and then
> capture its bytes.
>
> My big problem is that my program reads the image before that its
> complete by the png() function. For instance, my graphic image has
> 1000Kb. When R saves it into the hard disk, my Java program reads the
> file before the save operation completes (500Kb for example). So, I
> got only a part of the file and hence the image... :(
>
> One solution is read the image and search for a byte which represents
> the end of the file, but it depends on the image format...
>
> So, how can I discover that R image save operation stored the complete
> file into the hard disk?

When dev.off() completes and you get an R prompt back.

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Received on Tue Aug 16 23:50:14 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 15:23:32 EST