• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..07-May-2022-

doc/H03-May-2022-

AUTHORSH A D26-Jul-2014335 1912

COPYINGH A D26-Jul-201417.6 KiB340281

HISTORYH A D26-Jul-20142.2 KiB9659

READMEH A D26-Jul-20142.3 KiB7552

scale2x.cH A D26-Jul-201441.3 KiB1,4811,030

scale2x.hH A D26-Jul-20144.5 KiB6932

scale3x.cH A D26-Jul-201423.8 KiB723551

scale3x.hH A D26-Jul-20141.5 KiB349

scalebit.cH A D26-Jul-201419 KiB512265

scalebit.hH A D26-Jul-20141.6 KiB445

README

1                           =========================
2                           Scale2x, Scale3x, Scale4x
3                           =========================
4
5Scale2x, Scale3x and Scale4x are real-time graphics effects
6able to increase the size of small bitmaps guessing the
7missing pixels without blurring the images.
8
9They were originally developed for the AdvanceMAME project
10in the year 2001 to improve the quality of old games running
11at low video resolutions.
12
13The specification of the algorithm and more details are at :
14
15    http://scale2x.sourceforge.net
16
17This package contains some implementations of the effects
18in C and MMX Pentium assembler, and command line tools to
19convert manually .PNG images.
20
21
221 IMPLEMENTATION
23================
24
25The files scale2x.c and scale3x.c are the fast C and MMX
26implementations of the effects.
27
28The files scalebit.c and scalebit.h are the fast C implementations
29of the effects ready to be applied to a generic bitmap.
30Note that the implementation of the Scale4x effect is not
31obvious without using a big intermediate buffer.
32
33The files scalerx.c is a simple command line processors,
34which uses the reference implementation of the effects.
35
36The files scalex.c is another simple command line processors,
37which uses the fast implementation of the effects.
38
39
402 TOOLS
41=======
42
43The command line tools "scalerx" and "scalex" read a .PNG file
44and write another .PNG file with the effect applied.
45The syntax of the programs is :
46
47    scalerx [-k N] [-w] FROM.png TO.png
48    scalex [-k N] FROM.png TO.png
49
50The option -k can be used to select the scale factor.
51The option -w can be used to scale textures with a wraparound effect.
52
53To compile the command line tool you need the libz and libpng
54libraries.
55
56
573 EXAMPLES
58==========
59
60The directory example/ contains some examples of the effects applyed
61to a generic image and to a test image.
62
63The suffix of the images means :
64    1 - Original image.
65    2 - Scale2x effect.
66    3 - Scale3x effect.
67    4 - Scale4x effect.
68    1x - Scaled normally 12 times.
69    2x - Scale2x effect and scaled normally up to 12 times.
70    3x - Scale3x effect and scaled normally up to 12 times.
71    4x - Scale4x effect and scaled normally up to 12 times.
72
73The `x' images have the same final size and can be used to compare
74pixel by pixel the result of the effects.
75