Difference between revisions of "En:Epimgconv"

From Enterprise Wiki
Jump to: navigation, search
(Version history: 11 11 2008 Zaxial format; faster conversion; dither fix attemption)
Line 115: Line 115:
 
'''31 05 2008''': First version, no attribute and interlace modes, only the black-and-white mode was with interlace.
 
'''31 05 2008''': First version, no attribute and interlace modes, only the black-and-white mode was with interlace.
  
 +
=Links and more=
 +
* [[Iview guide]] (doesn't exist in English, yet)
 +
* [http://www.ep128.hu/Ep_Util/Prg/Paintbox_2.rar download Paintbox 2]
 +
* [http://www.ep128.hu/Ep_Util/ZozoTools.htm Zozotools 1.8 Hungarian guide] [http://www.ep128.hu/Ep_Util/Prg/ZozoTools18.rar download]
 +
* [http://www.ep128.hu/Ep_Util/Prg/Agsys.rar download Agsys 1.1]
 +
* [http://www.enterpriseforever.org/letoltesek_downloads/pc_utils-t358.0.html download EPimgconv and EPcompress]
 +
* [http://www.ep128.hu/Ep_Util/Zaxial.htm Zaxial Hungarian guide] [http://www.ep128.hu/Ep_Util/Prg/Zaxial.rar download]
  
  

Revision as of 21:04, 20 November 2008

The PC -> EP image converter program can be downloaded here. After unpacking (e.g with WinZip) it can be used in DOS prompt.

Using Epimgconv

An example for using it:

epimgconv foo.jpg foo.com

JPG, BMP, PNG, GIF and XPM input file formats are supported.

Parameters

Video mode can be chosen by -mode parameter, using the next values:

   * 0: 2 colours, normal vertical resolution (not surely black and white but an optimized palette is generated for each lines)
   * 1: 4 colours, normal vertical resolution
   * 2: 16 colours; a picture dithered to 256 colours is being converted into a picture of 16 colours without dither (default setting), normal vertical resolution
   * 3: 16 colours; it generates the same palette as mode 2 but the original picture is being dithered to 16 colours, normal vertical resolution
   * 4: 16 colours; it tries to mix generating palette and dithering but it's very slow, normal vertical resolution
   * 5: 256 colours, normal vertical resolution
   * 6: attribute mode, normal vertical resolution
   * 10: 2 colours (black and white), interlace (not surely black and white)
   * 11: 4 colours, interlace
   * 12: 16 colours; a picture dithered to 256 colours is being converted into a picture of 16 colours without dither, interlace
   * 13: 16 colours; it generates the same palette as mode 2 but the original picture is being dithered to 16 colours, interlace
   * 14: 16 colours; it tries to mix generating palette and dithering but it's very slow, interlace
   * 15: 256 colours, interlace
   * 16: attribute mode, interlace

So -mode 0-6 uses the normal vertical resolution and -mode 10-16 uses the interlace.


--help prints brief usage information, and the list of all available command line options.

-raw 1 parameter enables to save in raw format (not usable without a separate viewer program), instead of the default .com application format; this way the size also can be larger (if the output format is application, size can be at maximum 46 characters * 288 lines only). -outfmt n also enables to save in raw format, it can have the following parameters:

  • -outfmt n (11<=n<=19): Here n means the compression level of raw file. Epcompress utility enables to convert between compressed and uncompressed raw format.
  • -outfmt 2 saves the converted picture into Agsys .crf format which can be used only in mode 1 (4 colours/lines, not interlace); furthermore Agsys cannot load files of large size (-size 36 216 still works but -size 40 240 doesn't). Though Agsys supports palette that changes every lines, the picture may be easier to edit by setting fix palette with the parameters -color0..-color3.
  • -outfmt 3 saves the picture into ZozoTools format (which uses VL and VS commands). It doesn't support interlace and attribute modes, and fix file size can be at the most 16K. This format sets automatically -palres 0 and EXOS-compatible picture-size (at the most 42x27 characters, height divisible by 9) like -outfmt 4.
  • -outfmt 4: PaintBox format; it doesn't support interlace modes either, the file cannot store FIXBIAS, so it has to be set either according to the value given by the converter or you have to use -bias 23 parameter when converting. This format sets automatically -palres 0 and EXOS-compatible picture-size (at the most 42x27 characters, height divisible by 9) as well as -outfmt 3.


-size W H enables to set picture size. W = Width in characters, H = Height in lines (interlace: field lines). Being one of the given values 0 or negative, it'll be automatically calculated from the other value and from the size of the picture. E.g. -size 46 0 means that width is always 46 characters and height is automatically chosen by right of the size of the picture. This way however height could be also too big, so giving a negative value the maximal size can be set. E.g. -size 46 -300 effects the same as -size 46 0, but if the height were bigger than 300 lines, it'll be 300 lines and width will be also reduced.

As default, Epimgconv converts images into the largest possible size, but by using -scale X Y and -offset X Y parameters the image can be enlarged and offset.

-scalemode 1 resizes the picture not in the way that it have the largest size without the cut parts but without the smallest empty (border-coloured) areas. So if the proportion of width and height given by the -size parameter is not fit, there won't be any border-coloured areas but a part of the picture will be cut sideways or underneath and above.

-color0 n ... -color7 m parameters can set fix palette colours (actually setting of avoiding using certain colours is not available). As -mode -0 and -mode 10 parameters don't result a black-and-white picture, -color0 0 -color1 255 parameters are needed to be given to reach black-and-white pictures. The colours can also be given in #RGB format, for example #000 is black and #773 is white.

-bias parameter sets fixbias - maybe better quality is available than by automatically selected colours. The colours can be given in #RGB format as well, e.g. #331 means bias=31.

If the .com file is too large (>47.75K), it'll be automatically compressed; so EXOS (being lucky) can load it though it starts much slowlier. Using -nocompress 1 parameter, automatic compression of "large" programs can be turned off.

Parameter -nointerp 1 turns off interpolation while resizing a picture (e.g. converting from 32x32 to 512x512 2 colour interlace format without interpolation - this way all the pixels became a square of size 16x16.)

-palres 0 disables palette changing each line (default: -palres 1), so the palette will be the same in the whole picture. It generally gets quality worse so it might seem not to be very useful, but this way the converted file can get somewhat smaller and it might be easier to use in some other programs.


IstvanV

Suggestions, tips

I used the following methods and combined them:

  • attribute mode results the best quality and then the 4 colour mode;
  • I picked pictures containing not too complex structures;
  • I cut the better part from the picture but in the way that its composition remain pretty;
  • I looked for pictures where it's useful that there are lots of colours in the horizontally separated parts;
  • I picked pictures of strong colours and of many, diverse colours.

The better conversions were where these factors turned up the best way.


Endi

Version history

11 11 2008: Zaxial designer format is also supported, and this format can be loaded using the original "VLOAD" command in attribute mode. The conversion became faster in 16 colour modes (2, 3, 4, 6), which is significant first of all using -mode 4. -mode 2 and 3 are also noticeably faster if -quality 9 is set. Further changes: dither worked sometimes wrong while working with too light and too dark parts - it could be detected mostly in 16 colour modes at '-palres 0' - the new version attempts to fix it.

07 11 2008: New parameters: -palres; -outfmt 3, -outfmt 4: Now Zozotools and Paintbox formats are also supported.

31 10 2008: Giving a 0 or negative value after -size parameter makes the computer reckon or sets the maximal possible size.

30 10 2008: New parameters: -scalemode 1 and -outfmt 2 (saving into Agsys file format).

29 10 2008: Handling compressed format, mode/bias/palette and attr/pixel datas are stored separately (actually both of them are compressed). Thanks to the ordering of the palette and attributes, compression efficiency also got somewhat better.

The downloadable package also contains the actual version of IVIEW.


24 10 2008: Datas are stored by type, not by field; automatically compressed .com files already run under EP64 as well; the header contains also the number of frames.


20 10 2008:

Setting VRES bit.

2 colour mode doesn't use a definite black-and-white palette any more as default but an optimized palette is selected in each lines, like in the 4 colour mode. The former black-and-white mode can be set by using -color0 0 -color1 255 parameters;

New parameter: -outfmt.


19 10 2008: Pictures of any sizes between 1x1 and 8192x8192 are accepted; the internal compressor became faster and has somewhat better efficiency; Programs run also with EP64 (automatically compressed ones not yet). New parameters: -nointerp and -nocompress.


07 06 2008: -color0-7, -bias parameters also can be given; if the .com file is >48K, it'll be compressed.


02 06 2008: Attribute and interlace mode options.


31 05 2008: First version, no attribute and interlace modes, only the black-and-white mode was with interlace.

Links and more