/[projet1]/public/pc/tools/osdk/main/pictconv/sources/oric_converter_samhocevar.cpp
Defence Force logotype

Diff of /public/pc/tools/osdk/main/pictconv/sources/oric_converter_samhocevar.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1122 by dbug, Tue Feb 4 18:15:58 2014 UTC revision 1123 by dbug, Sun Apr 6 14:37:45 2014 UTC
# Line 60  Line 60 
60  // Image dimensions and recursion depth.  // Image dimensions and recursion depth.
61  // DEPTH = 2 is a reasonable value,  // DEPTH = 2 is a reasonable value,
62  // DEPTH = 3 gives good quality, and higher values may improve the results even more but at the cost of significantly longer computation times.  // DEPTH = 3 gives good quality, and higher values may improve the results even more but at the cost of significantly longer computation times.
 #define WIDTH 240  
 #define HEIGHT 200  
63  #define DEPTH 2  #define DEPTH 2
64    
65    
# Line 423  void OricPictureConverter::convert_sam_h Line 421  void OricPictureConverter::convert_sam_h
421    
422    init_tables();    init_tables();
423    
424      int width=sourcePicture.GetWidth();
425      int height=sourcePicture.GetHeight();
426    
427    // Load the image into a friendly array of fast integers.    // Load the image into a friendly array of fast integers.
428    // We create it slightly bigger than the image so that we don't have to care about borders when propagating the error later    // We create it slightly bigger than the image so that we don't have to care about borders when propagating the error later
429    int* src = (int*)calloc((WIDTH + 1) * (HEIGHT + 1) * 3, sizeof(int));    int* src = (int*)calloc((width + 1) * (height + 1) * 3, sizeof(int));
430    int* dst = (int*)calloc((WIDTH + 1) * (HEIGHT + 1) * 3, sizeof(int));    int* dst = (int*)calloc((width + 1) * (height + 1) * 3, sizeof(int));
431    int stride = (WIDTH + 1) * 3;    int stride = (width + 1) * 3;
432    
433    unsigned int pictureWidth(sourcePicture.GetWidth());    unsigned int pictureWidth(sourcePicture.GetWidth());
434    
# Line 455  void OricPictureConverter::convert_sam_h Line 456  void OricPictureConverter::convert_sam_h
456    {    {
457      unsigned char bg = 0, fg = 7;      unsigned char bg = 0, fg = 7;
458    
459      fprintf(stderr, "\rProcessing... %i%%", (y + 1) / 2);      fprintf(stderr, "\rProcessing... %i%%", (y + 1)*100 / height);
460    
461      for (x = 0; x < pictureWidth; x += 6)      for (x = 0; x < pictureWidth; x += 6)
462      {      {

Legend:
Removed from v.1122  
changed lines
  Added in v.1123

  ViewVC Help
Powered by ViewVC 1.1.26