| Title: | -={ H A C K E R S }=- | 
| Notice: | Write locked - see NOTED::HACKERS | 
| Moderator: | DIEHRD::MORRIS | 
| Created: | Thu Feb 20 1986 | 
| Last Modified: | Mon Aug 03 1992 | 
| Last Successful Update: | Fri Jun 06 1997 | 
| Number of topics: | 680 | 
| Total number of notes: | 5456 | 
Does anyone know of a program to convert a REGIS generated picture file into a SIXEL picture file. I know this must exist, somewhere. thanx, -jim-
| T.R | Title | User | Personal Name | Date | Lines | 
|---|---|---|---|---|---|
| 354.1 | or vise versa? | BPOV09::GRAHAM | Fri Nov 14 1986 12:46 | 6 | |
|     How about one that converts SIXEL to ReGIS?  When I "upgraded" from
    my VT125 to a VR241 driven by a Rainbow, I found that there wasn't
    a terminal emulator available that ran on the Rainbow that would
    allow you to display SIXEL files.
    
    					John G.
 | |||||
| 354.2 | TONTO::KMB32 | Trevor on vacation in N.H. | Fri Nov 14 1986 14:19 | 6 | |
|     
    	DECgraph (or DECslide - I don't remember [maybe both ?]) will
    convert Regis to Sixel. 
    
    
    Trev
 | |||||
| 354.4 | Indeed they do. | FROST::HARRIMAN | The *ing *er's *ing *ed. | Mon Nov 17 1986 14:54 | 25 | 
|     Indeed they do. If you have DECslide and/or DECgraph, try the
    following:
    
    $ SLIDE/NOINTERACTIVE/SIXEL your_file(.SLO)
    
      which generates your_file.SLS
    
      or
    
    $ GRAPH/NOINTERACTIVE/SIXEL your_file(.GRO)
    
      which generates your_file.GRS
    
      The extensions are hard-coded to be .SLO and .GRO respectively.
    You will probably have better luck with SLIDE, since GRAPH imposes
    it's graph rules over whatever picture you are trying to convert.
    
      I don't know of any tool which provides SIXEL -> ReGIS translation,
    but try the GRAPHICS conference... I know of PLOT11 which turns
    ReGIS to HPGL plot language...
    
    good luck
    
    /pjh
    
 | |||||
| 354.5 | Use DECslide or ReGISHARD | PIXEL::PWONG | Paul H. Wong | Tue Nov 18 1986 10:58 | 26 | 
|     Re: < Note 354.4 by FROST::HARRIMAN "The *ing *er's *ing *ed." >
    The information given was not quite correct.  
    DECgraph only produces SIXEL files (.GRS) from its internal data and
    graph description files (.GRI,.GRD,.GRL and .GRG).
    DECslide, on the other hand, has two ways of producing SIXEL files.
    It can either
	(1) generate SIXEL files (.SLS) from its internal description
	    files (.SLD), or 
	(2) produce SIXEL files (.SLS) from arbitrary ReGIS files, ie.
		$ SLIDE/NOINTER/SIXEL=yourfile.SLS  your_ReGIS.file
    The second way seems to be the one .0 is looking for.  The caveat for
    using both DECgraph and DECslide to generate SIXEL files is that you
    need to be running on a ReGIS terminal.  This is because both products 
    use the "let the terminal generate the SIXEL and ship it back to the host"
    trick.
    If this caveat is too restrictive for you, you can also try the
    ReGISHARD program.  You should contact James (CUJO::)Gay for a
    copy.
    - Paul
      (Ex-DECgraph hacker)
 | |||||
| 354.6 | you get what you pay for | FROST::HARRIMAN | The *ing *er's *ing *ed. | Tue Nov 18 1986 12:19 | 9 | 
|     I sit corrected.
    
    I thought DECslide was like DECgraph in the respect that it had
    hard coded extensions. I see that's not a valid assumption (after
    trying it on a picture I had in ReGIS)... Thank you for clarifying
    that...
    
    /pjh
    
 | |||||
| 354.7 | If you want to roll your own... | BISTRO::HEIN | Hein van den Heuvel, Valbonne. | Wed Nov 19 1986 04:10 | 90 | 
| 
    
 1	OPTION TYPE = EXPLICIT
	ON ERROR GO TO HELL
 !
 !	Basic source by Hein van den Heuvel, Valbonne oct-1985.
 !
 !	This program will read a VT125 or VT240/VT241's graphic screen
 !	and dump the information back to the computer into a file name
 !	specified by the user. The file will be in a SIXEL format that
 !	may then be spooled of to a graphic printer (LA50, LA100, LA12)
 !	
 !	This program does not make sure to have the Set Host Sync flag
 !	for the terminal, because it does not use huge amounts of single
 !	charater I/Os, (fortran example), but uses QIOs terminated by
 !	ESCAPE instead.
 !
 !	Note :   Do NOT type any characters on the terminal's keyboard
 !	         after the file name is supplied to this program, that
 !	         is,  until  the  operating  system prompt re-appears.
 !
	EXTERNAL LONG CONSTANT	SS$_NORMAL, IO$_READVBLK,	&
				IO$M_NOECHO, IO$M_ESCAPE
	EXTERNAL LONG FUNCTION	SYS$ASSIGN, SYS$QIOW
	DECLARE LONG CONSTANT	Io_Size = 200
	DECLARE STRING CONSTANT	Graphics_on	= ESC+'Pp'	,&
				Graphics_off	= ESC+'\'	,&
				To_Computer	= ESC+'[?2i'	,&
				To_Printer 	= ESC+'[?0i'	,&
				Hard_Copy	= 'S(H)'
	DECLARE STRING	File_Name, LONG S
	MAP (X) WORD	Io_stat, Io_len, Fill, Trm_Len, Channel
	MAP (Y) STRING	Char = 1000
        DEF LONG FN.SYS ( STRING SYSCAL, LONG SYSSTAT )
	    IF ((SYSSTAT AND 1%) = 0%) THEN
		PRINT Graphics_off; "SYS Error"; IO_STAT; " calling "; SYSCAL
	        CALL LIB$STOP ( SYSSTAT BY VALUE )
	    END IF
	    IF (IO_STAT <> SS$_NORMAL) THEN
		PRINT Graphics_off; "IO Error"; IO_STAT; " calling "; SYSCAL
	        CALL LIB$STOP ( IO_STAT BY VALUE )
	    END IF
    	    FN.SYS = SYSSTAT
    	END DEF
	
 !	Get the terminal's channel number for the QIO.
	Io_Stat = SS$_NORMAL
	S=FN.SYS("Assign",Sys$Assign ("TT:",Channel,,))
 !	Ask for file name and create it, This would all probably be done
 !	differently in a permanent version.
 !
	PRINT ESC; "[23;1H"; ESC; "[JDump File name";
	INPUT LINE File_Name
	OPEN EDIT$(File_Name,6%) FOR OUTPUT AS FILE #1%, 		&
		RECORDTYPE NONE, MAP Y, EXTENDSIZE 9
	PRINT ESC; "[23;1H"; ESC; "[J";
 !
 !	Re-direct I/O from printer port to the communication port,
 !	enter ReGIS graphic mode on the terminal,
 !	issue the SIXEL dump command to the terminal for hardcopy.
 !
	PRINT To_Computer; Graphics_on; Hard_Copy;
 !
 !	Get the initial data sent, synchronize on the first <ESC> \
 !	
	WHILE (Trm_Len<>2%) OR (SEG$(Char,Io_Len+1%,Io_Len+2%)<>Graphics_off)
	    S=FN.SYS("GET INIT", Sys$QIOW (,Channel BY VALUE, 		&
		IO$_READVBLK+IO$M_NOECHO+IO$M_ESCAPE  BY VALUE, Io_Stat,,,&
		Char BY REF, Io_size by value,,,,))
	NEXT
 !
 !	Now get some real data (SIXEL bit map data and terminate on <ESC> \
 !
	Trm_Len = 0%
	WHILE (Trm_Len<>2%) OR (SEG$(Char,Io_Len+1%,Io_Len+2%)<>Graphics_off)
	    S=FN.SYS("GET DATA", Sys$QIOW (,Channel BY VALUE, 		&
		IO$_READVBLK+IO$M_NOECHO+IO$M_ESCAPE BY VALUE, Io_Stat,,,&
		Char by ref, Io_size by value,,,,))
	    PUT #1%, COUNT Io_Len + Trm_Len
	NEXT
	PRINT Graphics_off; To_Printer;
	GO TO 2
 HELL:
	PRINT Graphics_off; ERT$(ERR)
	RESUME 2	
 2	END
 | |||||
| 354.8 | see also DTRDIG | HBO::ORNSTEIN | Ian Ornstein DTN 269-2168 ICO Chelmsford | Wed Nov 19 1986 09:45 | 1 | 
| other replys to this question exist in the DTRDIG notes file. | |||||