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
 Bug Patch for Resample Code
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

BytePlayer

USA
3 Posts

Posted - Jan 05 2012 :  15:58:10  Show Profile  Reply
ImageEnPro.pas

In both the lines listed below, AlphaChannel is being created if it doesn't exist so they need to be changed to the following:

Line 5735 --
if source.HasAlphaChannel then
  _ResampleEx(source, dest, IEIFB(true, source.AlphaChannel, nil), FilterType, fOnProgress, Sender)
else
  _ResampleEx(source, dest, IEIFB(False, Nil, nil), FilterType, fOnProgress, Sender);

Line 16108 --
if Src.HasAlphaChannel then
  _ResampleEx(Src, Dst, IEIFB(True, Src.AlphaChannel, nil), FilterType, nil, nil)
else
ResampleEx(Src, Dst, IEIFB(false, nil, nil), FilterType, nil, nil);

fab

1310 Posts

Posted - Jan 06 2012 :  06:48:32  Show Profile  Reply
You're right, thank you! Actually IEIFB is no longer necessary, so the code can be:

if source.HasAlphaChannel then
  _ResampleEx(source, dest, source.AlphaChannel, FilterType, fOnProgress, Sender)
else
  _ResampleEx(source, dest, nil, FilterType, fOnProgress, Sender);

and

if Src.HasAlphaChannel then
  _ResampleEx(Src, Dst, Src.AlphaChannel, FilterType, nil, nil)
else
  _ResampleEx(Src, Dst, nil, FilterType, nil, nil);
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: