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, August 19, 2010 10:35:52 AM(UTC)
tteveris

Groups: Registered
Posts: 32


Dazed and confused - Leadtools 15 C++ Libraries

I have a JPEG image with the following FileInfo

-  fi {uStructSize=1640 Format=98 Name=0x0046f550 "acg01136hr_concrete_shingles08.jpg" ...} _FILEINFOA
  uStructSize 1640 unsigned int
  Format 98 int
+  Name 0x0046f550 "acg01136hr_concrete_shingles08.jpg" char [512]
  Width 3600 int
  Height 3600 int
  BitsPerPixel 24 int
  SizeDisk 5205577 long
  SizeMem 38880000 long
+  Compression 0x0046f764 "JPEG" char [20]
  ViewPerspective 1 int
  Order 1 int
  PageNumber 1 int
  TotalPages 1 int
  XResolution 300 int
  YResolution 300 int
  Flags 8196 unsigned int
  GlobalLoop 0 unsigned int
  GlobalWidth 3600 int
  GlobalHeight 3600 int
  GlobalBackground 0 unsigned long
+  GlobalPalette 0x0046f7a4 {rgbBlue=0 rgbGreen=0 rgbRed=0 ...} tagRGBQUAD [256]
  IFD 0 unsigned long
  Layers 0 int
  ColorSpace 1 int

As you can see is a little over 5MB on the disk. if I open it and then save it the saved version is 3X. What am I missing


 

FILEINFO fi;

memset(&fi, 0, sizeof(FILEINFO));

L_INT error;

if ((error = L_FileInfo("D:\\Jobs (D)\\4SCR\\6993\\acg01136hr_concrete_shingles08.jpg",&fi,sizeof(fi),0,NULL)) != SUCCESS)

return 0;

BITMAPHANDLE bh;

if ((error = L_LoadBitmap("D:\\Jobs (D)\\4SCR\\6993\\acg01136hr_concrete_shingles08.jpg", &bh, sizeof(BITMAPHANDLE), 0, ORDER_BGR, NULL, NULL)) != SUCCESS)

return 0;

if ((error = L_SaveFile("D:\\Jobs (D)\\4SCR\\6993\\save.jpg", &bh, FILE_JPEG_RGB, 24, 0, 0 , NULL, NULL, NULL)) != SUCCESS)

return 0;

Thanks in advance

 

 

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, August 19, 2010 10:41:49 AM(UTC)
tteveris

Groups: Registered
Posts: 32


I should have mentioned I want the to have the quality of the orginal.

 

I select PQ1 but it does like that setting.

 
#3 Posted : Friday, August 20, 2010 12:24:05 PM(UTC)

Walter  
Walter

Groups: Tech Support
Posts: 366

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)

Hello,

Do you see this same issue when saving with the pre-compiled C++ Class Library demo that ships with the SDK?

What quality factors have you tried when saving this file? Please note that the qFactor valud can range from 2-255, with 2 being the least compressed (and largest file size) and 255 being the most compressed (smallest file size).

The quality factor can be set with the SAVEFILEOPTION structure, which is then passed into the L_SaveFile method as the last parameter.

Also, could you provide a sample file with which you're testing this so we can try this here as well?
Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
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-2024, Yet Another Forum.NET
This page was generated in 0.097 seconds.