LEADTOOLS Support
Imaging
Imaging SDK Questions
Default DPI Setting in Header for TIFF CCITT Group 4
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Thursday, August 9, 2007 3:57:23 AM(UTC)
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 );
#2
Posted
:
Sunday, August 12, 2007 4:36:22 AM(UTC)
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
LEADTOOLS Support
Imaging
Imaging SDK Questions
Default DPI Setting in Header for TIFF CCITT Group 4
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.