[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

5028.0. "Converting RAW-Bits-> IFF" by COLTRG::HENGSTMANN (An Experiment never lies ...) Mon Sep 09 1991 04:55

    Help needed (again).
    
    From note 5011.* you might remember that i'm going to
    display Weather Satellite Images on the AMIGA 500.Looks
    like i was somewhat too easy on that.
    
    10 \
    30  \
    3F   > These are Bytes with 6 Bit Gray Values coming
    00  /  from the Receiver and stored in a File
    3F /

    To me it looks like i have to convert these Bytes into Bitplanes
    (say 6 Bitplanes and HAM Mode) because if i try to give this File
    an IFF Header and display it, we achieve a picture that looks like
    the display of these binary values.
    
    Anyone has a routine to convert what i would call RAW DATA into
    IFF BITPLANE File ?
    
    I now i am penetrant .
    Gru�
    Klaus
T.RTitleUserPersonal
Name
DateLines
5028.1Use DigiViewSTAR::GUINEAUbut what was the question?Mon Sep 09 1991 10:4638
Do you have DigiView?

If so, the quickest way is to display images with more than 4 bits (16 levels) 
of grey scale is to create DigiView IP files.

An IP file is a 24 bit RGB image. They must be the same format as the Amiga
resolution modes (ie 320x200, 640x400 etc). 

The file is a sequence of bytes, no header. The R G and B planes are
arranged in that order in the file. DigiView also puts 12 bytes
at the very end of the file. These can be zeros. They are the setting of
the various processing sliders. The order of pixels is as follows (ex a 
320x200 image):

	byte 0 in file		upper left pixel red value (8 bits)
	byte 1 in file		next pixel to the right
	.
	.
	byte 64000		upper left pixel green value
	.
	.
	byte 128000		upper left pixel blue value
	.
	.
	192000			12 bytes of zero.


This sequence for each plane continues across each line, down the screen (
starting in upper left, ending in lower right)

For grey scales, take the 6 bit data, pad it with zeros to 8 bits, then create
this file. If your image data is not 320x200 or 640x400 (etc), then you must
pad each line/add lines to the end with zeros. The file sizes must be exact. 

Then just load it into DigiView. DV does a nice job of processing this data...

john

5028.2DIGI-VIEW sounds good to me.COLTRG::HENGSTMANNAn Experiment never lies ...Mon Sep 09 1991 11:238
    John,

   thank you for this one. I'll try to get my hands on DIGI-VIEW.
   Looks like at least we could see something after some Homework
   is done by padding our 256 Pixel/line Images to 320.
    
    Thanks again
    KLaus 
5028.3 oops, it doesn'tCOLTRG::HENGSTMANNAn Experiment never lies ...Tue Sep 10 1991 04:187
    
    Looks like DIGI-VIEW is the expensive approach !
    
    Someone has another Idea or Hack ?
    
    Gru�
    Klaus
5028.4Simply RAW->IFF?FORTY2::CADWALLADERda-na-na-na...re-fle-fle-flex!Tue Sep 10 1991 08:5313
Hi,
	Maybe I misunderstand the original problem - but if all you need to do
	is convert a file of raw bit-values into an IFF format file then there 
	are various PD utilities to do this. There is one called IFFconvert,
	and many demo groups have written very useful & flexible programs to
	convert data to and from RAW, IFF, sprite data, dc.b form etc...
	I remember one written by Kefrens which was particularly good.

	Check out PD libraries etc. for these utils...

	BTW - Is this the sort of thing you were after?

								- JIM CAD*
5028.5The Problem: RAW->IFFCOLTRG::HENGSTMANNAn Experiment never lies ...Tue Sep 10 1991 09:3135
    
    	Yes Jim,
    
    	Looks like all i want to do is to convert "sequential Bytes containing
    	6 Bit of Gray Value for each one Pixel" into an IFF/ILBM Bitmap.
    	But i am not sure if i understood the AMIGA correct. Please
    	let me describe how it looks to me :
    
    	AMIGA BITMAP IMAGE WITH 6 BITPLANES  (maybe HAM or so)
                        5       5
                      4	      4
                    3        3
                  2        2
                1        2
              0        2
              ^        ^
           PIXEL 0    PIXEL 1       and so on, up to 320 Pix. for example
    
    IMAGE COMING FROM THE A/D CONVERTER WITHIN MY EQUIPMENT :
    
             00111111	3F	one  Byte 6 bit intensity Pixel 0
             00001111   0F      next Byte 6 bit intensity Pixel 1
                    .
                    .
    	     Total of 256 X 256 Pixels / Screen  
             4 Screens = 1 Satellite Fly-By from 25�N up to 80�N (~16minutes)

        To me it looks as if we have to convert our "horizontal Pixels"
        to a "vertical Bitmap"
        Maybe i should have a second Look on EOT::    
        I must admit beeing walking through the FF_CAT_V1 + FF_CAT_V2
        but did not find anything pointing into this Direction.
    
    	Thanks
    	Klaus
5028.6iff.libraryELMST::MCAFEESteve McAfeeTue Sep 10 1991 11:157
    If you want to do this in code, then unpack the raw data into the
    bitplane format of a raster image on the amiga.  And yes it would be
    all of bitplane1 then bitplane2, etc.  Then get a copy of christian
    weber's IFF.LIBRARY. This will take a pointer an Amiga raster and
    output an iff file.  I've used this myself and it works very well.
    
    -steve
5028.7I mean what you seeCOLTRG::HENGSTMANNAn Experiment never lies ...Tue Sep 10 1991 11:4016
    
    Steve,
    
    i think i got the drift, but forgive me, i am not exactly eager
    to code this unpacking stuff right now. You know, i was hoping
    that someone else might have done this before.
    Just can't find an Utility on EOT and Software Support in GY
    is virtually non existent.
    They either sell Hardware or Applications and not even support what
    they sold.
    
    thanks
    Klaus
    
   

5028.8PEEVAX::GIFFORDMy dunny was kicked down by chooks!Wed Sep 11 1991 21:1013
I have an application which will take a VAXcamera data file

(512 * 512 * 7 bits) and converts it to DDIF (Spectral class grayscale)

This program could be hacked very easy to convert your data to DDIF

Then all you need is DDIF to IFF!

Let me know if this will help at all.

Also if you could upload your data I would like to have a go anyway!

Stan.