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
 Layered Image Base Layer on top
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

bmesser

United Kingdom
221 Posts

Posted - Oct 26 2012 :  02:07:20  Show Profile  Reply
Hi

I am using ImageENView component with layers to animate a series of satellite images.

Instead of displaying a base map layer to overlay a rainfall radar image I want to make the base layer always on top to overlay an outline of the coast on top of the satellite image. Is it just a case of keeping the outline layer above the satellite layer?

I just thought they might be a clever way that you could flip the base layer to be always be the last layer to be overlaid rather than the first?

Bruce.

w2m

USA
1990 Posts

Posted - Oct 26 2012 :  14:31:54  Show Profile  Reply
// When you create the outline of the coast map, make everything on
// the map that is not a border transparent black.

// Load the base layer
ImageEnView1.LayersCurrent := 0;
ImageEnView1.IO.LoadFromFile('bordermap.png');

// Give the base layer a name:
ImageEnView1.Layers[0].Name := 'Border Map';

// Make the 'bordermap transparent (because you want it on top of other maps)
ImageEnView1.Proc.SetTransparentColors(TColor2TRGB(clBlack), TColor2TRGB(clBlack), 0);

Now load the rainfall layer:

iLayer := ImageEnView1.LayersAdd;
ImageEnView1.IO.LoadFromFile('RainFall Radar Image.png');
ImageEnView1.Layers[iLayer].Name := 'RainFall Radar Image';

//To move the baselayer (0- Border Map) over the RainFall Radar Image (layer 1) use LayersMove.
if (ImageEnView1.LayersCount > 1) {Layerscount should be 2 now) and (ImageEnView1.Layers[0].Name = 'Border Map') then
 ImageEnView1.LayersMove(0,iLayer);

I tried this here with some quickly made outline and precipation maps and it seems to work.

Good luck!


William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: