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
 Transition 'iettCubeRotote' show instable colors
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Sybren

34 Posts

Posted - Nov 20 2012 :  14:48:03  Show Profile  Reply
Hi,

When I want to save the transition frames from a 'iettCubeRotateFromLeft' transition it shows the correct transition sequence (squeezing one bitmap, while 'unsqueezing' the other) but the colors of each intermediate bitmap appears to be completely unstable. Sometimes it appears as the colors are shown as negatives, and other strange coloring effects are shown. The beginning of a transition goes well, but after a few frames the colors seems to go wild.

I followed the example from the helpfile (except for the number of steps):

procedure TransitionFrameCreationExample;
var
OldBitmap, NewBitmap, TransBitmap : TBitmap;
I : Integer;
TransLevel : Single;
begin
OldBitmap := TBitmap.Create;
NewBitmap := TBitmap.Create;
TransBitmap := TBitmap.Create;
try
OldBitmap.LoadFromFile('C:\OldImage.bmp');
NewBitmap.LoadFromFile('C:\NewImage.bmp');

// Call PrepareTransitionBitmaps once
ImageEnProc.PrepareTransitionBitmaps(OldBitmap, NewBitmap, iettCrossDissolve);

for i := 0 to 20 do
begin
// Transition levels from 0% to 100%
TransLevel := i * 5;

// Call CreateTransitionBitmap for each required frame
ImageEnProc.CreateTransitionBitmap(TransLevel, TransBitmap);
TransBitmap.SaveToFile('C:\TransImage' + IntToStr(I) + '.bmp');
end;
finally
OldBitmap.Free;
NewBitmap.Free;
TransBitmap.Free;
end;
end;

When I select another transition effect (not iettCubeRotateFromLeft) then all colors remain correct in all saved transition bitmaps.
Does anyone have any idea why the iettCubeRotateFromLeft (and FromRight, FromTop and FromBottom) transitions won't work using the above code?

thanks

Sybren

xequte

39053 Posts

Posted - Nov 21 2012 :  01:43:57  Show Profile  Reply
Hi Sybren

I assume when you perform the same transition with the same two images visually in a TImageEnView, then it works correctly?


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

Sybren

34 Posts

Posted - Nov 21 2012 :  10:03:08  Show Profile  Reply
Hi Nigel,

Yes. When I show the transition in an ImageEnView 'live' on the screen it works correctly.
I started this way, and then decided to save the full transition in a movie format. So I first wanted to see and check the individual bitmaps. Then I found the color changes. I then tested it with a randomly selected transition and these went just fine. Only the 4 CubeRotate transitions showed this recoloring effect.

thx for your support!

Sybren
Go to Top of Page

Sybren

34 Posts

Posted - Nov 21 2012 :  13:57:14  Show Profile  Reply
I think I solved the issue (can I call it an issue)?

I used a newly created ImageEnView.Proc instead of using an ImageEnProc. I copied the code from the help file to this post, and did the same in my application, but changed the application with a lot of test lines when the issue occurred. Hence my copying from the help file in this post.

I changed the code back to ImageEnProc, and now it worked correctly with all the transitions. Apparently an ImageEnView.Proc won't work well with this particular transformation.

Hope it sheds a bit of light on a possible issue?

thx

Sybren
Go to Top of Page

xequte

39053 Posts

Posted - Nov 21 2012 :  22:03:28  Show Profile  Reply
Hi

We'll have a fix in the next update. In the meantime you can modify the source

procedure TIETransitionEffects.CreateBitmap(...);
begin
  // New Lines
  if (TransitionProgress = 0) or FFirstStep then
    fCurrentView.assign(fSourceShot);

  DestBitmap.width   := fWidth;
  ETC...


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

Sybren

34 Posts

Posted - Nov 24 2012 :  08:59:06  Show Profile  Reply
Nigel,

Works perfectly.
Thanks!

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