/***************************************************************************
*                                                                          *
*  $VER: Status.strx 3.0 (14.Oct.93)                                       *
*   Copyright © 1993 by Stylus, Inc.                                       *
*   Author:  Jeff Blume                                                    *
*                                                                          *
*   This macro reports the Width, Height, Depth and Type (ie. B&W, etc.)   *
*                                                                          *
*                                                                          *
***************************************************************************/

options results

/* Get the image size (if Result=RESULT - no image loaded) */
'ImageWidth'; if Result = "RESULT" then exit; ImgWidth = Result
'ImageHeight'; ImgHeight = Result
'ImageType'; ImgType = Result
'ImageCMAPSize'; ImgCMAP = Result

select
	when ImgType = 0 then ImgType = "Black & White"
	when ImgType = 1 then ImgType = "Indexed "||"("||ImgCMAP||" Color)"
	when ImgType = 2 then ImgType = "Greyscale (8 bit)"
	otherwise ImgType = "True Color (24 bit)"
end

call DefGads
address REXXREQUEST
'GetRequest Gads'


EXIT


DEFGADS:
/* Define Public Screen */
Gads.PubScreen = "STYLUSTRACER"

/* Define Window */ 
Gads.0.LeftEdge = 60; Gads.0.TopEdge = 12
Gads.0.Width = 272; Gads.0.Height = 58
Gads.0.Label = "Bitmap Status"

/* Define Label Gadgets */
Gads.1.LeftEdge = 8; Gads.1.TopEdge = 8
Gads.1.Width = 112; Gads.1.Height = 12
Gads.1.Type = Label
Gads.1.Label = "Image Width = "||ImgWidth

Gads.2.LeftEdge = 8; Gads.2.TopEdge = 16
Gads.2.Width = 112; Gads.2.Height = 12
Gads.2.Type = Label
Gads.2.Label = "Image Height = "||ImgHeight

Gads.3.LeftEdge = 8; Gads.3.TopEdge = 24
Gads.3.Width = 112; Gads.3.Height = 12
Gads.3.Type = Label
Gads.3.Label = "Image Type = "||ImgType

Gads.4.LeftEdge = 8; Gads.4.TopEdge = 32
Gads.4.Width = 112; Gads.4.Height = 12
Gads.4.Type = Label
Gads.4.Label = "CMAP Size = "||ImgCMAP

/* Total Gadgets + Window */
Gads.NumGads = 5
return	/* return DefGads */
