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 9, 2007 3:57:23 AM(UTC)

Jerome  
Jerome

Groups: Registered
Posts: 3


When creating a FILE_CCITT_GROUP3_1DIM , is the DPI in the header defaulted?  I am creating the new image with the code below and then taking two other images and combining them onto the new one.  The header has a DPI of 150.  I expected and needed it to be 200.

Create the LBitmap

lReturn = bmpOut.Create( lWidth, lHeight * 2L, lBitsPerPixel );

Saving the LBitmap - lImageType = 27(FILE_CCITT_GROUP3_1DIM )

bmpOut.Save( lImageType, lBitsPerPixel, QS ); 

 

 

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 : Sunday, August 12, 2007 4:36:22 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

Was thanked: 1 time(s) in 1 post(s)

Hello,

You can change the resolution of the image before saving it by using the LBitmapBase::SetXResolution and LBitmapBase::SetYResolution methods.

The following code shows how to set the resolution of the image to 200 DPI before saving it:
+-------+
L_INT LBitmapBase__SetXResolutionExample(LBitmapBase& Bitmap)
{
if(Bitmap.GetXResolution()<200)
Bitmap.SetXResolution(200);
if(Bitmap.GetYResolution()<200)
Bitmap.SetYResolution(200);

Bitmap.SetFileName(TEXT("c:\\tif.tif"));
Bitmap.Save(FILE_CCITT_GROUP3_1DIM, 1, 0, NULL);

return SUCCESS;
}
+-------+

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
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.051 seconds.