LEADTOOLS Support
Imaging
Imaging SDK Questions
Error when converting JPEG to JPEG with Leadtools
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Thursday, June 21, 2007 10:03:28 AM(UTC)
Groups: Registered
Posts: 9
I'm trying to convert an input image to a JPEG output image with this code
L_LoadBitmap((LPSTR)lpszName, &m_bmhLEAD, sizeof(BITMAPHANDLE), 0, ORDER_BGR, NULL, NULL) BITMAPHANDLE * pLeadBM = &m_bmhLEAD;
int
iFormat = FILE_JFIF;
iResult = L_SaveBitmapMemory(&m_hFileInMemory, // file comes back
here
pLeadBM, // the LEAD format BITMAPHANDLE
iFormat, //
0, // using existing
resolution
0, // perfect quality (lossless)
&uMemSize, NULL);
pData = (L_CHAR L_FAR
*)::GlobalLock(m_hFileInMemory);
iWidth = pLeadBM->Width;
iHeight =
pLeadBM->Height;
I'm attaching the input image and the output image. The output image won't open in any viewer, this is in Leadtools C++ SDK version 14.5.0.43
Do you have any idea what's going wrong?
Attached is the input image, I'll attach the output image in the next comment
acook attached the following image(s):
#2
Posted
:
Thursday, June 21, 2007 10:05:49 AM(UTC)
Groups: Registered
Posts: 9
Here's the output from Leadtools, as you can see it doesn't open
acook attached the following image(s):
#3
Posted
:
Friday, June 22, 2007 9:27:29 AM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 764
Most viewers do NOT support Lossless JPEG compression (QFactor = 0). You will be able to open this file with LEADTOOLS and viewers that support lossless JPEG. You need to save with a QFactor of 2-255 to get the most compatibility with other viewers.
#4
Posted
:
Monday, June 25, 2007 6:49:24 AM(UTC)
Groups: Registered
Posts: 9
That takes care of it, thanks!
LEADTOOLS Support
Imaging
Imaging SDK Questions
Error when converting JPEG to JPEG with Leadtools
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.