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
 TIEMultiBitmap can't load this JPG

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
Dany Posted - Dec 09 2024 : 07:30:31
Hello;

TIEMultiBitmap can't load the attached JPG (I sent it into a zip).

attach/Dany/202412972924_test.zip
175.42 KB

Example code:

procedure TForm23.Button1Click(Sender: TObject);
begin
 with TIEMultiBitmap.Create do
 try
   if not Read('TEST.JPG') then
     ShowMessage('Error')
   else
     ShowMessage('ok');
 finally
   free
 end;
end;

Regards!

10   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Dec 15 2024 : 22:56:41
Yes, this works fine in our testing. I cannot explain the reason for the behavior on your side.

procedure TForm1.Button1Click(Sender: TObject);
var
  mbmp : TIEMultiBitmap;
begin
   mbmp := TIEMultiBitmap.Create;
   try
     if not mbmp.read( 'D:\TEST.PNG' ) then
       ShowMessage('Error')
     else
       ShowMessage('ok');
       ImageEnMView1.AssignEx( mbmp );
   finally
     mbmp.Free
   end;
 end;


Nigel
Xequte Software
www.imageen.com
Dany Posted - Dec 12 2024 : 13:00:32
Here the same file into a ZIP.

attach/Dany/20241212125844_test.zip
175.42 KB
Dany Posted - Dec 12 2024 : 12:55:01
Here is the TEST.PNG file.

xequte Posted - Dec 12 2024 : 02:50:38
Please attach your test.png and let me test it again.

Nigel
Xequte Software
www.imageen.com
Dany Posted - Dec 11 2024 : 08:28:15
Maybe some environment diference?. The test is the same .....
xequte Posted - Dec 10 2024 : 16:20:40
I'm sorry, I don't see that.

Nigel
Xequte Software
www.imageen.com
Dany Posted - Dec 10 2024 : 06:35:45
Read( 'D:\TEST.JPG', nil, True ) works.
But renaming to PNG does not work.
xequte Posted - Dec 09 2024 : 23:15:46
Hi Dany

Did you enable the bCheckUnknown parameter?

This works fine for me:

 with TIEMultiBitmap.Create do
 try
   if not Read( 'D:\TEST.JPG', nil, True ) then
     ShowMessage('Error')
   else
     ShowMessage('ok');
 finally
   free
 end;


This also works fine (note: extension needs to be "PNG"):

 RenameFile( 'D:\TEST.JPG', 'D:\TEST.PNG' );
 with TIEMultiBitmap.Create do
 try
   if not Read( 'D:\TEST.PNG' ) then
     ShowMessage('Error')
   else
     ShowMessage('ok');
 finally
   free
 end;


Nigel
Xequte Software
www.imageen.com
Dany Posted - Dec 09 2024 : 19:24:19
Hi Nigel;
Before asking, I already saw the file at low level founding that it say is PGN; so before asking I changed the extension to PGN, but TIEMultiBitmap can't load it. I also see that the old and well known :) MS-Paint can load it.
xequte Posted - Dec 09 2024 : 16:21:40
Hi Dany

Any time you find an image that does not load (in ImageEn or elsewhere), examine it in a hex or text editor and look at the magic string. You will see that this one, despite having the extension .JPG is actually a PNG file.

To make TIEMultiBitmap load images even if they have the incorrect file extension, you need to enable the bCheckUnknown parameter for Read/LoadFromFile()

http://www.imageen.com/help/TIEMultiBitmap.LoadFromFile.html

Nigel
Xequte Software
www.imageen.com