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
 Bitmap Bug

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
jeffp Posted - Aug 04 2026 : 16:05:35
The two options below should produce the same result. However, with the "Test.bmp" file attached as the Input ABitmap, option A produces a blank bmp while option B produces the correct result.


procedure TEST_BITMAP(ABitmap: TBitmap);
var
  MB: TIEMultiBitmap;
  B: TIEBitmap;
begin
  //Option A
  B := TIEBitmap.Create;
  try
    B.CopyFromTBitmap(ABitmap);
    B.SaveToFile('D:\Test5\TestA.bmp');
  finally
    B.Free;
  end;

  //Option B
  MB := TIEMultiBitmap.Create;
  try
    MB.InsertImage(0, ABitmap);
    B := MB.GetTIEBitmap(0);
    B.SaveToFile('D:\Test5\TestB.bmp');
  finally
    MB.ReleaseBitmap(0, False);
    MB.Free;
  end;
end;




attach/jeffp/20268416431_TestBitmap.zip
6432.53 KB

jp
5   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Aug 06 2026 : 23:34:50
Hi Jeff

OK, so this image is effectively blank. There is content in the RGB channels (two brown cards), but the Alpha channel is completely black, so "Option A", i.e. a blank output is correct.

At this point, TIEMultiBitmap does not support the A channel of 32bit RGBA images unless the alpha is synced:

http://www.imageen.com/help/TIEBitmap.SynchronizeRGBA.html

But I have added RGBA support when adding TBitmaps in the current beta (you can email me for it).

If you don't want the image to be blank (i.e. want to ignore the alpha channel), sync it (SynchronizeRGBA), then remove the alpha channel (without merging):

http://www.imageen.com/help/TIEBitmap.RemoveAlphaChannel.html

Nigel
Xequte Software
www.imageen.com
jeffp Posted - Aug 06 2026 : 17:41:14
Yes

jp
xequte Posted - Aug 06 2026 : 15:41:03
Sorry, I need to be able to reproduce this when I get back to the office today.

Does it occur if you load like this?

var ABitmap := TBitmap.Create();
ABitmap.LoadFromFile( 'D:\test.bmp' );
TEST_BITMAP( ABitmap );
ABitmap.Free();


Nigel
Xequte Software
www.imageen.com
jeffp Posted - Aug 05 2026 : 18:16:06
Value is pf32bit

jp
xequte Posted - Aug 05 2026 : 17:56:29
Hi Jeff

You don't show your method for loading ABitmap. What is the value of ABitmap.PixelFormat?

Nigel
Xequte Software
www.imageen.com