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 : Thursday, June 21, 2007 10:03:28 AM(UTC)

acook  
acook

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):
Returns.JPG
 

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 : Thursday, June 21, 2007 10:05:49 AM(UTC)

acook  
acook

Groups: Registered
Posts: 9


Here's the output from Leadtools, as you can see it doesn't open


acook attached the following image(s):
JFIF-157-68.jpg
 
#3 Posted : Friday, June 22, 2007 9:27:29 AM(UTC)

GregR  
GregR

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)

acook  
acook

Groups: Registered
Posts: 9


That takes care of it, thanks!
 
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-2020, Yet Another Forum.NET
This page was generated in 0.118 seconds.