Merging A5 to A4
Merging A5 to A4
I'm scanning duplex A5 papers and want to merge the A5 tiffs to A4..
any method to do so?
any method to do so?
Re: Merging A5 to A4
Hello,
You can create an empty image by using the CreateNewGdPictureImage() method and subsequently draw over it your images by using the one of the DrawGdPictureImage() methods.
Kind regards,
Loïc
You can create an empty image by using the CreateNewGdPictureImage() method and subsequently draw over it your images by using the one of the DrawGdPictureImage() methods.
Kind regards,
Loïc
Re: Merging A5 to A4
Hi,
I have tried to use the CreateNewGdPictureImage method and also the DrawGdPictureImage method to do so.
But the output image's bit depth is 24 when my input images' bit depth are 1 only. Hence the filesize of the output is very large and it lower my performance.
Here are my codes:
Can you give me some advice to do what i want?
Thanks a lot
Benny
I have tried to use the CreateNewGdPictureImage method and also the DrawGdPictureImage method to do so.
But the output image's bit depth is 24 when my input images' bit depth are 1 only. Hence the filesize of the output is very large and it lower my performance.
Here are my codes:
Code: Select all
Dim ImageID = _gimg.CreateGdPictureImageFromFile("image1.tif")
Dim ImageID2 = _gimg.CreateGdPictureImageFromFile("image2.tif")
Dim width = _gimg.GetWidth(ImageID) * 2
Dim height = _gimg.GetHeight(ImageID)
Dim ResImg = _gimg.CreateNewGdPictureImage(width, height, CType(_gimg.GetBitDepth(ImageID), Short), Color.White)
_gimg.SetHorizontalResolution(ResImg, 300)
_gimg.SetVerticalResolution(ResImg, 300)
MsgBox(_gimg.GetBitDepth(ResImg))
_gimg.DrawGdPictureImage(ImageID, ResImg, 0, 0, _gimg.GetWidth(ImageID), _gimg.GetHeight(ImageID), Drawing2D.InterpolationMode.High)
_gimg.DrawGdPictureImage(ImageID2, ResImg, _gimg.GetWidth(ImageID), 0, _gimg.GetWidth(ImageID2), _gimg.GetHeight(ImageID2), Drawing2D.InterpolationMode.High)
MsgBox(_gimg.GetBitDepth(ResImg))
If _gimg.GetBitDepth(ImageID) > 2 Or _gimg.GetBitDepth(ImageID2) > 2 Then
_gimg.SaveAsTIFF(ResImg, "out.tif", GdPicture.TiffCompression.TiffCompressionJPEG, 90)
Else
_gimg.SaveAsTIFF(ResImg, "out.tif", GdPicture.TiffCompression.TiffCompressionCCITT4)
End If
_gimg.ReleaseGdPictureImage(ImageID)
_gimg.ReleaseGdPictureImage(ImageID2)
_gimg.ReleaseGdPictureImage(ResImg)
Can you give me some advice to do what i want?
Thanks a lot
Benny
Re: Merging A5 to A4
Hello Benny,
Just convert it to 1bpp by using the ConvertTo1Bpp() method when you are done with your drawing operations.
Kind regards,
Loïc
Just convert it to 1bpp by using the ConvertTo1Bpp() method when you are done with your drawing operations.
Kind regards,
Loïc
Who is online
Users browsing this forum: No registered users and 1 guest