ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Bug Patch for Resample Code

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
BytePlayer Posted - Jan 05 2012 : 15:58:10
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);
1   L A T E S T    R E P L I E S    (Newest First)
fab Posted - Jan 06 2012 : 06:48:32
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);