Copyright (C) 2002 HelDoRe
Web design by Nauthiz

 
Project hosted at
SourceForge.Net

Polish version of this page

How to use MGA View

Installing MGA View

By now, MGA View is available only as a source code in .tar.gz archive.

The program doesn't have got function "configure" yet, so, after unpacking the source code, compile it using command:

	make
and then install it within the system using command:
	make install

Installing mga_vid driver

MGA View requires mga_vid driver (available in here). Mga_vid is a part of mplayer and you can find it within mplayer's source.

To compile mga_vid you will require a configured kernel source (it's enough if you at least once compiled the kernel by yourself :-)), so your system contains file /usr/src/linux/include/linux/modversion.h.

After unpacking mplayer's source, enter the "Drivers" directory and run make and make install. If everything went all right, the module is installed. :-)))

Then you have to create a Matrox graphic card interface (it's used by mga_vid.o module for sending data to the card's memory). Do it by typing:

	mknod /dev/mga_vid 178 0
It's recommended to change permissions of /dev/mga_vid file in order to give other users ability to read and write it, so not only root can use MGA View. ;-)))

In the end, add following line to modules.conf:

	alias char-major-178 mga_vid

Using MGA View

To execute MGA View just type:
	mgaview file_name
Along with the picture, MGA View displays program version, file format (even if it has no extension or its extension is incorrect), file height and width, its resolution and comment (if it exists).

If the picture is smaller than 100x100 pixels, MGA View automatically enlarges it 3 times, displaying a proper comment.

If the picture is bigger than 800x600 pixels, MGA View adjusts it in order to fit the screen.

To stop viewing the file and exit MGA View, press any key (except those). ESC key has to be pressed twice.

MGA View has also a few functions available from keyboard. Some of them are available only when mga_vid driver is used, but in future they will be enabled also for framebuffer.

Command keys

(Keys marked with * are available only for mga_vid)
C - compressed/uncompressed
Chooses file compression before saving (see S). File is saved as compressed by default, unless you change it this way.
 
F - fullscreen(scalling)/fullscreen (force to screen size)/normal
Pressing this key for the first time zooms displayed picture . Second pressing of this key forces it to screen size with no proportions. Third pressing returns normal size of the picture.
 
G -grayscale/color
Changes display mode from color to grayscale and vice versa. File displayed as grayscale will be also saved as grayscale.
 
R - reload image
Reloads picture.
 
S - save to zmg/tga
Saves picture as zmg (see description If zmg file is displayed, pressing S saves it to tga format. Extension is added automatically. Picture is saved as compressed by default, unless you change it by pressing C before.
 
T * - transparency
Displays picture as background. Along with stretching it, it's a good way to have console with a background. ;-)
 
Space
Jump to next file in directory (when browsing all files in directory).
 
Backspace
Jump to previous file in directory (when browsing all files in directory).

Viewing files in Midnight Commander

You can configure MC to view graphic files using MGA View.

In order to do this, use file example.mc from MGA View source and add its contents into /etc/mc/mc.ext in your system. It can be easily done by typing:

	cat example.mc >>/etc/mc/mc.ext
To enable these changes you should restart MC.

If this procedure won't work, you can configure MC manually. In order to do this, open User Menu (F9) and choose the following:

	commands -> extension file menu -> user
This will open the file ~/.mc/bindings. Add there following lines:
	shell/.bmp
		View=mga_view %f
Then add other file formats in the same way (see supported file formats). For example:
	shell/.jpg
		View=mga_view %f

	shell/.gif
		View=mga_view %f
...and so on.

Last update: Wed, 16 October 2002   MGA View 2002 by HelDoRe <tehace@konto.pl>
Web design by Nauthiz <nauthiz@wp.pl>