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
 Why calling PixelFormat gives error in IE 6.2.1
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

yogiyang

India
727 Posts

Posted - Aug 15 2016 :  08:16:47  Show Profile  Reply
Hello,

I am trying to use the following code to set up ImageEnVect.

var
  iImgWidth, iImgHeight: Integer;
const
  DPI = 200;
begin
  iImgWidth := iImgWidth;
  iImgHeight := iImgHeight;
  iImgWidth := iImgWidth * DPI;
  iImgHeight := iImgHeight * DPI;

  ievMain.Proc.ImageResize(iImgWidth, iImgHeight, iehLeft, ievTop);
  ievMain.Proc.Fill(clWhite);
  ievMain.IO.Params.Dpi := DPI;
  ievMain.ChangeResolution(DPI, rfBicubic);

  ievMain.Bitmap.PixelFormat := pf24bit; // <-- This line raises Error!

  ievMain.Layers[0].Locked := True;
  ievMain.Layers[0].Selectable := False;
  ievMain.Update;

I have attached demo project also for testing.

TIA

attach/yogiyang/201681581635_SetPixelFormat.zip
6.4 KB


Yogi Yang

xequte

38611 Posts

Posted - Aug 15 2016 :  21:42:13  Show Profile  Reply
Hi Yogi

You should always use ievMain.IEBitmap. Bitmap is for legacy support only.

Also, ensure ievMain.LegacyBitmap = False.



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

yogiyang

India
727 Posts

Posted - Aug 16 2016 :  11:47:53  Show Profile  Reply
Hello Nigel,

Thanks for the tip.



Yogi Yang
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: