Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

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