exportData problem

For discussion of LizardTech's free Decode SDK for MrSID and JPEG 2000.

Moderator: jskiffington

exportData problem

Postby np » Tue Oct 13, 2009 10:21 am

We're trying to use LTISceneBuffer::exportData() to export to a Windows RGB dib section. It works fine with 8 bit MrSID files but not with 16 bit MrSID files.

The call looks like this:

scenebuff.exportData((void *&)pBits,3,LizardTech::LTISceneBuffer::addAlignment(rectImage.Width() * 3,sizeof(DWORD)),1);

We expected that exportData() would output the data in the specified format (24 bits per pixel) but the end result is garbage - pretty colors but garbage none the less.

Using C++ 6.0 with Geo SDK 4.0.9.713

Any help would be appreciated.
np
 
Posts: 2
Joined: Tue Oct 13, 2009 7:11 am

Postby mpg » Thu Oct 15, 2009 10:59 am

The LTISceneBuffer is designed around the data type of the data source -- in this case, 16-bit unsigned data.

If you want to convert your data to 8-bit, you need to add an image stage after the reader which does the conversion. I think there is some demo code showing how to do this in the examples directory.

-mpg
mpg
 
Posts: 29
Joined: Thu Jan 24, 2008 1:50 pm
Location: LizardTech


Return to SDKs

Who is online

Users browsing this forum: No registered users and 2 guests

cron