LEADTOOLS Support
Imaging
Imaging SDK Questions
c++ Rasterization: Drawing char arrays to create a new PNG?
#1
Posted
:
Friday, May 14, 2021 3:03:24 PM(UTC)
Groups: Registered
Posts: 3
Does the c++ rasterization library support drawing character arrays on a bitmap? Basically turning a large set of text that is dynamically constructed into a PNG? This text would only be available in memory, not from a file, so the load options of rasterizing a .txt file do not seem to apply here... And writing that text to disk, just to load it again in the library seems overkill.
#2
Posted
:
Friday, May 14, 2021 3:51:39 PM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 153
Was thanked: 9 time(s) in 9 post(s)
I have reached out to you via email for some additional information.
Nick Crook
Developer Support Engineer
LEAD Technologies, Inc.

#3
Posted
:
Monday, May 17, 2021 3:39:38 PM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 153
Was thanked: 9 time(s) in 9 post(s)
Thank you for following up via email. Here's some additional information on how the SDK handles text files:
https://www.leadtools.com/help/sdk/v21/dh/to/file-formats-text-file-format-txt.html
Since raw text doesn't have any header information and in memory has no extension to examine, the toolkit needs to be manually informed of the correct filter to use. If you're using our c toolkit, the L_LoadBitmapMemory() can faciliate this. You'll need to set the pFileInfo.Name to something like "example.txt" so the SDK can examine the extension here.
https://www.leadtools.com/help/sdk/v21/main/api/l-loadbitmapmemory.html
In all cases, you'll still need to ensure the toolkit has access to the applicable filter.
https://www.leadtools.com/help/sdk/v21/main/api/files-to-be-included-with-your-application.html
https://www.leadtools.com/help/sdk/v21/dh/to/file-format-support.html
Nick Crook
Developer Support Engineer
LEAD Technologies, Inc.

#4
Posted
:
Monday, June 7, 2021 5:55:09 PM(UTC)
Groups: Registered
Posts: 3
I've implemented everything that you posted and I am almost there... When I attempt to use the L_LoadBitmapMemory() function, I get the error -1792 (ERROR_TXT_FILTER_MISSING - The lfTxtU.DLL library is missing). I have also added the function EnabledLoadTextFiles function from the main demo. I am building x64 and I have verified that the LfTxtX.dll and LfRtfX.dll are in the same folder as my running application. The application doesn't seem to have any other issues finding and loading other dlls I've placed there. What could be a reason these dlls could not be found/loaded or could there be another reason for this error?
#5
Posted
:
Tuesday, June 8, 2021 8:57:43 AM(UTC)
Groups: Registered
Posts: 3
Anyone looking at this with that error... It appears we were missing some other dlls from the redistributable SDK bin directory. We copied over all again and the error went away.
LEADTOOLS Support
Imaging
Imaging SDK Questions
c++ Rasterization: Drawing char arrays to create a new PNG?
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.