[comp.sys.atari.st] Graphics file formats on new machines

w-darekm@microsoft.UUCP (Darek Mihocka) (09/13/89)

I've got a question about the new graphics modes, such as Hyperscreen, 
Moniterm, and the new graphics modes in the STE and TT. Is there a
standard file format that will allow interchangability of graphics
images from one machine to another. Up until now, .PI1, .PI2, .PI3 and .NEO
seem to have been the standards because everybody had a 32000 byte screen.
What will happen now that screens are larger than 320K? None of the
above formats bother to include the screen resolution in their files.
Does Getrez() on the STE and TT just return higher numbers, like 3, 4, 5,
so you could theoretically update Degas to support .PI4, .PI5, etc, files.
Or are we all going to start using TIFF or GIF or color Mac paint?
Is TOS 1.4 smart enough to produce proper screen dumps on Hyperscreen
and other resolutions, or is Alt-Help a thing of the past? Do the new
graphics modes still work the same way (i.e. bit planes) or have they 
scrambled screen memory in new and wonderful ways? A simple modification
to say, the Degas file format, might be to keep the first word which 
indicates the graphics mode (0, 1, 2, 3, etc, which would map on to an
appropriate number of bit planes) followed by the color pallete and then
the image. Now, if the screen is not the standard 32000 bytes, invert
the high bit of the first word, and follow it immediately by two words
indicating the screen resolution, then the pallete, then the image.
i.e. a 1024x512 16 color image would have a header like this:
word 0: $8000 ($8000 | $0000)
word 1: $0400
word 2: $0200
words 3 thru 18: colors
words 19 to end: graphics image
That way normal Degas will puke if you try to load this new format, but
not the other way around.
Alternatively, you could go with a format that uses the normal Degas
format and appends additional data to the end of the file. The image would
then be stored in such a way that if you use Degas to load the image, it
would think it's loading a 640x400 image and display the upper left
640x400 pixels of the much larger image.
The reason I'd like to know is because I'm thinking of updating Megablit
<shrieks of horror from the other users> for the new graphics modes and
up until now I never did figure out how to implement a feature to save
the entire drawing area. (Megablit is a very cheap public domain larger-than-
screen graphics editor which I wrote way before Touch Up came out, so don't
believe those Touch Up ads <grin>).
Now that I've scared everybody away with the scary thought of a son of
Megablit, can I get some input from whoever has bothered to read this far?

-------------------------------------------------------------------------------
Darek Mihocka                 ST Xformer 2.5                    CIS: 73657,2714
Box 2624, Station B              MegaBlit                         GEnie: DAREKM
Kitchener, Ontario            Quick Utilities                    DELPHI: DAREKM
N2H 6N2                                                             BIX: darekm
Canada                               CheapNet: ...!uw-beaver!microsoft!w-darekm
(519)-747-0386      A mind is a terrible thing to waste, so just say no to TOS.
-------------------------------------------------------------------------------

neil@cs.hw.ac.uk (Neil Forsyth) (09/15/89)

In article <7677@microsoft.UUCP> w-darekm@microsoft.UUCP (Darek Mihocka)
writes:
> Up until now, .PI1, .PI2, .PI3 and .NEO
>seem to have been the standards because everybody had a 32000 byte screen.
>What will happen now that screens are larger than 320K? None of the
>above formats bother to include the screen resolution in their files.

There IS provision in the Neochrome header for different screen sizes although
in current versions of the program it is not used.

> A simple modification
>to say, the Degas file format, might be to keep the first word which 
>indicates the graphics mode (0, 1, 2, 3, etc, which would map on to an
>appropriate number of bit planes) followed by the color pallete and then
>the image. Now, if the screen is not the standard 32000 bytes, invert
>the high bit of the first word, and follow it immediately by two words
>indicating the screen resolution, then the pallete, then the image.
>That way normal Degas will puke if you try to load this new format, but
>not the other way around.

Nope. Degas Elite uses bit 15 in the rez word to signify a compressed image
.PCx.

I personally like the Neochrome format and although it only supports low rez
just now the first long in the header is the rez.

+-----------------------------------------------------------------------------+
! DISCLAIMER: Unless otherwise stated, the above comments are entirely my own !
!                                                                             !
! "I think all right thinking people in this country are sick and tired of    !
! being told that ordinary decent people are fed up in this country with      !
! being sick and tired. I'm certainly not and I'm sick and tired of being     !
! told that I am!" - Monty Python                                             !
!                                                                             !
! Neil Forsyth                       JANET:  neil@uk.ac.hw.cs                 !
! Dept. of Computer Science          ARPA:   neil@cs.hw.ac.uk                 !
! Heriot-Watt University             UUCP:   ..!ukc!cs.hw.ac.uk!neil          !
! Edinburgh, Scotland, UK                                                     !
+-----------------------------------------------------------------------------+

w-darekm@microsoft.UUCP (Darek Mihocka) (09/18/89)

In article <3104@brahma.cs.hw.ac.uk> neil@cs.hw.ac.uk (Neil Forsyth) writes:
>
>There IS provision in the Neochrome header for different screen sizes although
>in current versions of the program it is not used.
>
>I personally like the Neochrome format and although it only supports low rez
>just now the first long in the header is the rez.

I wasn't aware that Neochrome supports variable resolutions. Somebody
actually thought ahead was back in 1985?  :-)  I have also received
some email about the IMG format also supporting variable resolution. The
question still remains, what format will Atari and/or developers decide to
make the standard on the new machines (and Hyperscreen modified STs)? Or
will this be a wait and see situation? And how with the Getrez() function 
work on the new machines?

>
>Nope. Degas Elite uses bit 15 in the rez word to signify a compressed image
>.PCx.
>
ok, then, make it bit 14.  :-)

------------------------------------------------------------------------------
Darek Mihocka                   ST Xformer II              CIS: (out of order)
Box 2624, Station B            Quick Utilities                   GEnie: DAREKM
Kitchener, Ontario          MegaBlit   SSG   SPX                DELPHI: DAREKM
N2H 6N2                   Shareware, not Vaporware                 BIX: darekm
Canada      Blitter chip sucks!     CheapNet: ...!uw-beaver!microsoft!w-darekm
(519)-747-0386     A mind is a terrible thing to waste, so JUST SAY NO TO TOS.
Opinions expressed are my own and not those of anyone not named Darek Mihocka.
------------------------------------------------------------------------------