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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Changes of Hyiedefs in 4.3.1

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
PStadler Posted - Jun 09 2013 : 00:59:36
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
1   L A T E S T    R E P L I E S    (Newest First)
klausdoege Posted - Jun 09 2013 : 05:28:02
Hello Peter,
RedToGrayCoef and other are now in unit iesettings.
TIEImageEnGlobalSettings.RedToGrayCoef
You can find this in the new Helpfile.

Klaus
www.klausdoege.de