This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Tuesday, January 13, 2009 6:20:15 PM(UTC)
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.
#2
Posted
:
Wednesday, January 14, 2009 3:56:12 AM(UTC)
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.