Forum Discussion

Colin_McCrae's avatar
Colin_McCrae
Community Hero
8 years ago
Solved

Image Configuration properties?

I've been messing about with OCR to try and at least do something with a system we use which simply presents the user with a large Canvas. The Canvas is actual lots of buttons (all of which are fully...
  • HKosova's avatar
    8 years ago

    Hi Colin,

     

    Here's how to specify the color reduction for GIF:

    // JScript
    function Test()
    {
      var img = Utils.Picture;
      img.LoadFromFile("C:\\MyImage.bmp");
    
      var gifConfig = img.CreatePictureConfiguration("GIF");
      gifConfig.ColorReduction = "Windows system (20 colors)";
    
      img.SaveToFile("C:\\MyImage.gif", gifConfig);
    }

    We'll look at getting some more examples in the docs. Thanks for the feedback!