ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Changes of Hyiedefs in 4.3.1
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PStadler

Austria
60 Posts

Posted - Jun 09 2013 :  00:59:36  Show Profile  Reply
Hello,

I have my own procedure for SeparateObjects. It uses this code below,
where some variables imported from hyiedefs are removed now, like gRedToGrayCoeff etc. How can they be replaced?

Sincerely

Peter



        else
        begin
          _GetMediaContrastRGB(Bitmap, mR, mG, mB);
          t := (mR * gRedToGrayCoef + mG * gGreenToGrayCoef + mB * gBlueToGrayCoef) div 100;
          for i := 0 to Bitmap.Height-1 do
          begin
            pxrgb := Bitmap.Scanline[i];
            pxb := mask.Scanline[i+1]; inc(pxb);
            for j := 0 to Bitmap.Width-1 do
            begin
              with pxrgb^ do
                c := (r * gRedToGrayCoef + g * gGreenToGrayCoef + b * gBlueToGrayCoef) div 100;
              if c>=t then
                pxb^ := 255
              else
                pxb^ := 0;
              inc(pxrgb);
              inc(pxb);
            end;
          end;
        end;
      end;
    else
      for i := 0 to Bitmap.Height-1 do
      begin
        pxb := mask.Scanline[i+1]; inc(pxb);
        for j := 0 to Bitmap.Width-1 do
        begin
          with Bitmap.Pixels[j,i] do
            c := (r * gRedToGrayCoef + g * gGreenToGrayCoef + b * gBlueToGrayCoef) div 100;
          if c>=200 then
            pxb^ := 255
          else
            pxb^ := 0;
          inc(pxb);
        end;
      end;
  end;


Sincerely

Peter

klausdoege

Germany
389 Posts

Posted - Jun 09 2013 :  05:28:02  Show Profile  Reply
Hello Peter,
RedToGrayCoef and other are now in unit iesettings.
TIEImageEnGlobalSettings.RedToGrayCoef
You can find this in the new Helpfile.

Klaus
www.klausdoege.de
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: