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
 What do we get in TIEBitmap...
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

yogiyang

India
727 Posts

Posted - Mar 14 2015 :  08:08:14  Show Profile  Reply
Hello,

As I could not type the whole question in Subject so I have added ... at the end.

The actual there are two question:

1. What do we get when we try to retrieve IEBitmap from ImageEnView control which contains multiple Layers and Current Layer is other then the Background Layer?

What I am getting is only a patch of Gray color.

2. I have also observed that if we assign an ImageEnView control containing multiple Layers to an empty ImageEnView control only the background is copied over. Why?

TIA

Yogi Yang


Yogi Yang

w2m

USA
1990 Posts

Posted - Mar 14 2015 :  10:10:30  Show Profile  Reply
1. Show your code... the bitmap is from the current layer.

2. If you assign one ImageEnView to another you should get all layers and IO params according to the help file:
// Copy content from another TImageEnView, including layers and IO params
ImageEnView1.Assign(ImageEnView2);
// Copy only the image of another TImageEnView
ImageEnView1.Assign(ImageEnView2.IEBitmap);

When I assign here: ImageEnView2.Assign(ImageEnView1); ImageEnView2 is not gray. ImageEnView2 contains all bitmaps and layers from ImageEnView1; I do not have to call ImageEnView2.Update here but it may be necessary to be sure the control refreshes.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

yogiyang

India
727 Posts

Posted - Mar 14 2015 :  10:28:59  Show Profile  Reply
Here is the code:

imgView.Assign(ImageEnViewMain)

But then this code as done by Roy M Klever:

TheImage.Assign(imgView.IEBitmap);
TheImage.PixelFormat := ie24RGB;
imgView.IEBitmap.Assign(TheImage);

is then giving error.

Actually what I am trying to do is integreate Roy M Klever fantastic Curves Tool into my software.

TIA


Yogi Yang
Go to Top of Page

w2m

USA
1990 Posts

Posted - Mar 14 2015 :  10:51:48  Show Profile  Reply
Do either of the components contain layers? If so then I think Roy's curves only works on base layer.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

yogiyang

India
727 Posts

Posted - Mar 16 2015 :  05:47:45  Show Profile  Reply
Yes Bill, They contain layers.

I am hoping Roy will help me out.

Yogi Yang
Go to Top of Page

yogiyang

India
727 Posts

Posted - Mar 16 2015 :  07:13:35  Show Profile  Reply
The code that I am trying to use:

var
TheImage, Img: TIEBitmap;
begin
  imgView.LayersAdd;
  imgView.Layers[1].Assign(MainForm.ImageEnViewMain.CurrentLayer);
  TheImage.Assign(imgView.Layers[imgView.LayersCurrent].Bitmap);   //<= This is giving error
end;

The last line is giving error in spite of the fact that both TheImage and imgView.Layers[imgView.LayersCurrent].Bitmap are TIEBitmap.

I don't understand as to why?

TIA




Yogi Yang
Go to Top of Page

w2m

USA
1990 Posts

Posted - Mar 16 2015 :  07:35:26  Show Profile  Reply
Put a break point on the offending line and run in debug mode. When the cursor is on The Image look to see if it is nil in the hint. Also look at imgView.LayersCurrent].Bitmap to see if it is nil.

If either of these is nil for some reason there will be an exception. What exception are you getting?... be specific... just telling us you get an error does not help us at all to assist you.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

yogiyang

India
727 Posts

Posted - Mar 16 2015 :  23:11:11  Show Profile  Reply
Bill,

The error messages shown by Delphi and the error message shown by application when we run its exe directly are attached here.

TIA







Yogi Yang
Go to Top of Page

yogiyang

India
727 Posts

Posted - Mar 16 2015 :  23:14:07  Show Profile  Reply
Bill,
quote:
Put a break point on the offending line and run in debug mode. When the cursor is on The Image look to see if it is nil in the hint. Also look at imgView.LayersCurrent].Bitmap to see if it is nil.



On the offending line the variable TheImage is nil while the source contains an Image in it.

Now what?

TIA


Yogi Yang
Go to Top of Page

yogiyang

India
727 Posts

Posted - Mar 16 2015 :  23:55:58  Show Profile  Reply
It seems I found the problem somewhere else!!!!

When I copied the Form from Roys sample folder to my project's folder and added it to my Delphi Project. For some unknown reasons all the events of various controls were disconnected!!??!!

On correcting this it started working.

But...but.

The image is not loading in the control at the moment.

Working on this though.

Regards,


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