s-news
[Top] [All Lists]

Re: [S] binary _to_jpg

To: s-news@wubios.wustl.edu, srosenfeld@nesdis.noaa.gov
Subject: Re: [S] binary _to_jpg
From: Prof Brian Ripley <ripley@stats.ox.ac.uk>
Date: Thu, 23 Jul 1998 16:04:47 +0100 (BST)
Reply-to: Prof Brian Ripley <ripley@stats.ox.ac.uk>
Sender: owner-s-news@wubios.wustl.edu
> From: srosenfeld@nesdis.noaa.gov
> Date: Thu, 23 Jul 98 10:29:23 -0500
> Subject: [S] binary _to_jpg
> To: s-news@wubios.wustl.edu
> 
> Dear S'ersPLUS!:
> 
> Many thanks to Thomas Schmugge, Prof. Brian Ripley and especially to Bob 
Henery 
> for fast response. Now I inderstand that the obstacle for transition from 
binary 
> to JPG is that S_plus does not handle one-bite data (so far, of course!)

byte, I hope.  Svr4 and therefore S-PLUS 5 has a raw data type, but
I still would not use S-PLUS.

> 
> Therefore, I want to slightly simplify the task. I transform binary matrix  
into 
> the 3-digits integer matrix outside S-plus (using, say, a FORTRAN module 
> launched from S-PLUS). How to proceed from this point?
> What I need is an entirely automatic procedure without any keyboard 
> interventions (INPUT: a million of binary files, OUTPUT: a million of 
JPG(BMP?) 
> files)
> 
> I work with S+3.3/4.5 on Pentium2/400MGz/128RAM under W95/98

As I said before privately I think the solution is just to launch an
external convertor. Why re-invent the wheel? ImageMagick's convert
program will convert

  GRAY  Raw gray bytes.
to
  GIF   CompuServe graphics interchange format; 8-bit color.
  GIF87 CompuServe graphics interchange format; 8-bit color (version 87a).
  JPEG  Joint Photographic Experts Group JFIF format; compressed 24-bit color.

and many others.  And it is available for Windows NT (runs on 95).
http://www.wizards.dupont.com/cristy. (You don't need Xwindows to run convert,
so do not be put off by the docs.)

If it really is a million, I would not go near S-PLUS unless you are
very very confident of no memory build up. And at 2 sec/image it will
take a month. And even small examples (32 x 32, rather small for JPEG)
take a gigabyte of input. And does your Windows 9x machine stay up that long?

-- 
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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message:  unsubscribe s-news

<Prev in Thread] Current Thread [Next in Thread>