Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, January 13, 2009 6:20:15 PM(UTC)

mbrims  
mbrims

Groups: Registered
Posts: 2


Hi, I have Lead Tools v15 and I am using VS6 (VC++) on XP (sp 3)
My goal is to display a byte buffer to the screen. Below is my code, it doesn't work can you please help me.

        byte *buf = new byte [100];
        LBitmap lbmp;
        LBuffer buffer(buf, 100);
        LMemoryFile memFile(&lbmp);
        int ret = memFile.Load(buffer);

memFile.Load returns -9 which is invalid file format. But I dont know what it wants.



 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Wednesday, January 14, 2009 3:56:12 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

Was thanked: 1 time(s) in 1 post(s)

You are getting the error "invalid file format" because you are trying to load an image from an empty memory buffer. You can't use the LMemoryFile::Load function to load an image from an empty memory buffer. The memory buffer must be in any supported image file format and bits per pixel, whether compressed or uncompressed.

For more information, please read the help topic "LMemoryFile::Load" in the LEADTOOLS C++ Class Library documentation.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.098 seconds.