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

Conference 7.286::atarist

Title:Atari ST, TT, & Falcon
Notice:Please read note 1.0 and its replies before posting!
Moderator:FUNYET::ANDERSON
Created:Mon Apr 04 1988
Last Modified:Tue May 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1433
Total number of notes:10312

901.0. "Image file Conversion" by OPG::CHRIS (Capacity! What Capacity ?) Fri Jun 15 1990 08:19

    Can anyone help.  Has anyone a program which converts a .GIF or
    .DDIF or .IMG files to DEGAS format please, VAX based or ATARI based
    no problem.
    
    Cheers,
    
    	Chris
T.RTitleUserPersonal
Name
DateLines
901.1.IMG file format/conversion ?EICMFG::BURKEJim Burke, @UFCSun Aug 18 1991 20:2523
    I'm using a new feature (ie. V3.1) of C-Lab's Notator sequencer - the
    image dump print facility. Notator dumps notation pages to diskfile in
    ".IMG" format , which is readable by 1st-Word, Calamus,...

     However, I want to take these files elsewhere (eg. VaxStation,
     PC, Mac,...), and so I have to convert them into something readable
     by the 'other' system, such as Postsript, GIF, Mac, etc.

     Does anyone know:
    
     (1)  A utility to convert these files ?
          Many convertors seem to limit the bounds of conversion to the
          screen resolution. This is no good - such a page of notation at
          300 DPI is HUGE.

     (2)  The format of them ?
          If it is a standard bit-image pixel dump format, then it should
          be easy enough to convert this to a PostScript 'image' entity.
          I'll do this if I can get some info on the .IMG file format.

Any helpers ?
Jim Burke
    
901.2Touch-UP?PRNSYS::LOMICKAJJeffrey A. LomickaTue Aug 20 1991 15:007
Migraph's Touch-up can read them and write them at printer resolution,
if you have enough RAM.  It can write a bunch of standard formats.  If
you would like, you can ZOO up an .IMG and I'll convert a few to try
out.  There's no PostScript or GIF, but it can do TIF and I think at
least one flavor of GIF.  Touch-Up also let's you "touch up" the image,
but costs a bundle (about $100.).

901.31st-Word images OK ?EICMFG::BURKEJim Burke, @UFCWed Aug 21 1991 04:2818
    Jeff,
    	 Thanks for the pointer & offer. Unfortunately, I can't upload an
    image until next week. However, try Touch-up with the ".IMG" files
    distributed with 1st-Word (ie. the clipboard directory). If it can
    handle them, then it should handle the (much larger) notation images.
    
    The reason I ask you to try this, is that I got a few utilities (AIM ?)
    which claim image-to-postscript conversion. However, this did not work
    correctly with the 1st-Word images. There was something there in the
    converted image OK, but whatever it was, it was garbled. It may have
    been  something to do with colour/mono (I use mono). Perhaps it expects
    a different type of  'image' ?
    
    I've never heard of "Touch-up". Is this available in the UK ?
    
    Regards,
    Jim
    
901.4UTOX.RUTILE::BISHOPWed Aug 21 1991 11:3414
    To get the .IMG files on the VAX, have you tried UTOX?
    
    If you have a workstation, you can read in .IMG files by selecting
    the "OPEN .DDIF". Then you change the file name to *.IMG and do a
    filter.
    
    Now you can save in any of the above formats.
    
    Of course, if you don't have a workstation and/or UTOX then this
    wont help you ;-)
    
    Regards,
    
     				Lewis.
901.5PRNSYS::LOMICKAJJeffrey A. LomickaWed Aug 21 1991 14:214
I've never looked at First Word, but I'll take a look and see.

Touch-Up is distributed by Migraph and is a BIG NAME in the U.S.  I would
be surprised if they didn't market their stuff in the UK as well.
901.6Atari.IMG = VMS .IMG ???EICMFG::BURKEJim Burke, @UFCThu Aug 22 1991 04:3620
re: .4
	I do have a workstation with UTOX. I think I did try inputting an 
        Atari .IMG file into UTOX - it blew up as I remember. 

        I would be surprised if the Atari image file format is the same as 
        that on VMS. If, as I suspect, the file is a simple pixel array, then 
        it must be preceded with *at least* two specifiers, for example:-
		horizontal resolution (pixels),
		colour resolution     (bits per pixel).

	I suppose a bit of test-imaging and file-dumping would throw some light 
        on this, but I'm surprised there isn't some published data on the '.IMG'
	file format. Looks like this is a hacking job.

re: .5
	Thanks Jeff - let us know how you get on.

Regards,
Jim
          
901.7Graphic FormatsUFRCS2::FALKENSTEINSat Aug 24 1991 08:26199
    
    
    I remember that I looked over an article one or two years ago 
    that described the graphic formats of the Atari. I have no idea
    how formats on a workstation looks like, so I can only give you
    the information that I read in the magazine. Maybe with these
    informations it's possible to write a convertor for our workstations.
    It would open up completely new dimensions for writing documentations
    at home and then transport them to a Station to print them out on
    a LN or LPS. Here is what I found:
    
    
    DOODLE:        (*.DOO)
    ======================
    Screenformat:  32,000 Bytes Picturedata, Bytes 1-32,000
                   no color range
    Resolution:    Low/medium/high
    Filesize:      32,000 Bytes
    
    
    DEGAS (normal) (*.PIx)
    ======================
    Screenformat:  32,000 Bytes Picturedata, Bytes 35-32,034
                   32 Bytes color range, Bytes 3-34
                   (32 Bytes color animation data, Bytes 32,035-32,066)
    Resolution:    Low/medium/high
    Filesize:      32,034 or 32,066 Bytes
    ID:            Byte 1: 00
                   Byte 2: resolution (0=low, 1=med, 2=high)
    
    
    NEOCHROM       (*.NEO)
    ======================
    Screenformat:  32,000 Bytes Picturedata, Bytes 129-32,128
                   32 Bytes color range, Bytes 5-36
    Resolution:    low only
    Filesize:      32,128 Bytes
    
    
    ART Director   (*.ART)
    ======================
    Screenformat:  32,000 Bytes Picturedata, Bytes 1-32,000
                   32 Bytes color range, Bytes 32,001-32,032
                   another 15 color ranges for animations in
                     Bytes 32,033-32,512
    Resolution:    low only
    Filesize:      32,512 Bytes
    
    
    PACKED FORMATS:
    ---------------
    IFF-Format (used in Amiga's DELUXE PAINT and Atari's DEGAS ELITE)
    uses some blocks called CHUNK. The IFF-format also is available
    for other things than graphic (music, text a.s.o.). The first 
    block in a IFF-file is the FORM-CHUNK that describes the kind of 
    file (lenght 8 Bytes).
    Available are: 8SVX for 8 bit sample voice, SMUS for simple music
    score, FTXT for formatted text and ILBM for interleaved bitmap.
    Following the name of the CHUNK is it's lenght without the name (ID).
    The next CHUNK is BMHD which means Bitmap Header. It contains 
    general information about the picture. The CMAP-CHUNK describes the
    color range, 3 Bytes for every color. CRNG-Chunk contains data about
    color rotation and shading (mostly available 4 times). The BODY-CHUNK
    is the graphics part of the picture. In the following table the 
    letters mean: B=Byte, W=Word, L=Longword
    
    FORM Chunk    BMHD Chunk    CMAP Chunk    CRMG Chunk    BODY Chunk
    -------------------------------------------------------------------
    total-lenght  chunklenght   chunklenght   chunklenght   chunklenght
    (8 Byte) (L)      (L)           (L)           (L)           (L)
    
    IFF-graphic      width      color 0 red       zero      picture data
       (4B)           (W)           (B)           (W)           (B)
    
                     hight     color 0 green     speed         a.s.o.  
                      (W)           (B)           (W)
    
                   x-position   color 0 blue     active          
                      (W)           (B)           (W)           
    
                   y-position   color 1 red    lower color       
                      (W)           (B)           (B)
    
                   bitplanes   color 1 green   upper color       
                      (B)           (B)           (B)
    
                    masking     color 1 blue                     
                      (B)           (B)                
    
                   compressing   color 2 red                     
                      (B)           (B)
    
                     zero       color 2 green                    
                      (B)           (B)
    
                  trancparency   color 2 blue                    
                      (W)           (B)
    
                    x-aspect     color 3 red                    
                      (B)           (B)
    
                    y-aspect    color 3 green                    
                      (B)           (B)
    
                   page width    color 3 blue                    
                      (W)           (B)
    
                   page hight      a.s.o.                       
                      (W)    
         
    with a disk monitor these chunks are easily seen on a IFF-file.
    
    
    Compressed DEGAS ELITE   (*.PCx)
    ================================
    Screenformat:       with IFF compressed picture data starting at 
                        Byte 35-xxx
    color range:        32 Bytes, with IFF-standard starting at 
                        Bytes 3-34
    color animation:    32 Bytes, starting after picture data
    resolution:         low/medium/high
    file-lenght:        variable, depending on picture size
    ID:                 Byte 1: 80
                        Byte 2: resolution (0=low, 1=med, 3=high)
    remark:             according to IFF-standard only with the
                        compression. Definition-Chunk of IFF is
                        not existing!
    
    
    IMAGE-Format: (*.IMG), no color range!!!
    -------------
    developed by Digital Research to find a format that is 
    interchangeable between GEM-Computers. This is the format which is
    used with Wordplus and the SNAPSHOT utility. An image-file looks 
    like described below.
    Header, a certain amount of picturelines (some of them might be
    double), in the lines a certain amount of Bytes (that might also 
    be double). That means, double-lines and double-bytes can be packed
    together. A row of bytes cannot reach beyond the line border.
    
    Header: (with variable lenght)
    -------
    ver_num:       Version number of file (optional, can be anything)
    head_len:      Lenght of header
    plane_num:     Number of used planes (to determine color res.)
                   (1st plane = lowest bit of color)
    pat_len:       lenght of used patterns (mostly 2 Bytes)
    pix_wid:       width of pixels of the used device in micrometer
    pix_hght:      hight of pixels of the used device in micrometer
                   (this information enables a programm to calculate
                   the output correctly for e.g. printers...)
    pix_num:       pixels per screen line (width of actual picture)
    scan_num:      number of screen lines per picture (hight of picture)
    
    every entry is two bytes. The appearance is as follows:
    
    Line-Header:  Four Bytes, first three bytes is the ID, the fourth 
                  byte contains how many times the line repeats
                  ( 00 00 FF nn )
    
    Plane-Header: Every line consists of multiple planes (one in mono),
                  that can be compressed in themselves
    line not compressed:  80 nn (nn = number of following bytes)
    line with optional pattern: 00 nn (nn = number of pattern repetitions)
    line with empty or full pattern: Bit 7 set = full pattern
                                     Bit 7 reset = empty pattern
                                     Bits 0-6 = Repetitions
    
    Now the compressed picture data is following. From the header we know
    how many lines and planes the picture has. Every line has it's header
    that is also called vertical repetition factor (VRF) and is defined
    like 
    this: constant Bytes 0,0,$FF, then number of repetitions. E.g. if the
    picture is ten lines in hight, and all lines are identical, the VRF
    would look like 0,0,$FF,$A plus the plane description. All planes must
    be repeated, that means all identical lines with different colors must
    be defined in different line descriptions.
    How to distinguish between the planes: in the header of the image file,
    Byte 7, is the lenght of line in pixel. Recalculate that into Bytes and
    count them during decoding. Then the appearance of the next plane is
    obvious. With the optional width in pixel the last bits might be 
    skipped (e.g. width = 65 pixel, that's 9 Bytes with the last one only
    one bit used). Equal lines may be repeated, but also within a plane
    a compression is possible. There are three possibilities:
    
    1. plane-line has no equal patterns and is used original
    2. plane-line has patterns with the width that is described in the
       header
    3. Special of 2: repeated bytes that have either all bits set or reset
    
    These 3 possibilities are described in another header that is in front
    of each line of a plane. If a programm can't compress according to 
    one of the three possibilities, so the line is used in the original
    format. Then in front of the line there's a header like 80 nn with
    nn = number of following bytes.
    
    
    Bernd
    
901.8That's the stuff !EICMFG::BURKEJim Burke, @UFCTue Aug 27 1991 08:1311
��Bernd,
          Phew !   That's a wealth of info - well done !
     
     ...seems like this '.IMG' format isn't as simple as I thought...
     I'm going to dump a few test '.IMG's and see if I can relate to the
     specification you have input.
     
Many thanks,
Jim
    
    
901.9Another document on picture file formatsYNOTME::WALLACETue Aug 27 1991 11:517
.IMG file format is also described in David Baggett's "ST Picture Format"
document, along with 23 other picture file formats. The document can be
copied from -

	OLDTMR::$1$DUA8:[WALLACE.PUBLIC.ST]PICFORMT.DOC

  Ray
901.10Try thisHAN01::KUNTZEMatthias Kuntze SWAS Hannover ProjektzentrumThu Aug 29 1991 04:3136
      If you only want to convert a .IMG File to Sixel or Postscript, 
      You can use my STCVT program. I do this very often (scanning a 
      picture at home, making slides) and print it on our laser prin-
      ters or include them into decwrite.
      
      How to do:
        
        make a picture at your atari
        copy the .img file to a floppy
        take the floppy to a vaxstation 3100 (into the floppy drive)
        use 
        PCDISK> use A: DKA500: ! or DUA2:
        PCDISK> export file.IMG
        PCDISK> exit
        $ Define ME mmy_directory
        $ MC ME:FILESET file.IMG /RECTYP=FIXED /RECSIZ=512
        $ SET COMMAND ME:STCVT.CLD
        $ STCVT /GEM file.IMG /OUT=file.SIX
        $ UTOX file.SIX/SIX file.PS/PS
        
        ready.
      
      If you don't have STCVT.* and FILESET.*, you can get it from my 
      directory:
      
                HAN01::USERDISK1:[KUNTZE.EASYNET.ST]STCVT.CLD
                HAN01::USERDISK1:[KUNTZE.EASYNET.ST]STCVT.EXE
                HAN01::USERDISK1:[KUNTZE.EASYNET.ST]FILESET.EXE
                HAN01::USERDISK1:[KUNTZE.EASYNET.ST]FILESET.HLB
      
      If you have trouble with PCDISK, look in this notesfile.
      
      Matthias
     
        
901.11STCVT works, but...EICMFG::BURKEJim Burke, @UFCWed Oct 02 1991 12:0313
    Matthias,
    		I got it working on small images, but it blows up when I 
    try to convert a large file, say, at 300 dpi.
    The error is - 'Format fehler Line Repeat'. It does produce a PS file,
    however, but sometimes the resultant image is corrupt.
    
    Boundary/maxima problem ?
    
    If you want, I'll have a look at the source if you send me it.
    
    Thanks,
    Jim
    
901.12max.line 4096 points, IMG problem?HAN01::KUNTZEMatthias Kuntze SWAS Hannover ProjektzentrumMon Oct 07 1991 05:058
    Hello Jim,
    
    You are right, I limited the max. line width to 4096 points. But the
    error shows me, that an 'FF' Byte is missing in the .IMG file. 
    I'll send the sources to you. If you have trouble to fix the problem,
    please send the .IMG file to me.
    
    Matthias