zimmer9
asked on
Do you know how, using C#, to increase the size of 2 merged images that are displayed vertically (one image on top and one image on the bottom, of the scren) in 1 file?
Using the following code, I create 2 check images that are displayed vertically (the front image on top and the back image on the bottom) from 1 file.
The bad news is that the front check image is taking up about 1/4 of the top of the screen and the back check image is taking up about 1/4 of the bottom half of the screen, which makes their contents hard to read.
Do you know how to revise this code so that the front check image will take up the entire upper half of the screen and the
back check image will take up the entire bottom half of the screen?
I have attached a display of the (small) size and the position of the 2 check images on the screen.
MemoryStream ms = new MemoryStream(bytesFrImg, 0, bytesFrImg.Length);
ms.Write(bytesFrImg, 0, bytesFrImg.Length);
System.Drawing.Image image = System.Drawing.Image.FromS tream(ms, true);
MemoryStream ms1 = new MemoryStream(bytesBkImg, 0, bytesBkImg.Length);
ms1.Write(bytesBkImg, 0, bytesBkImg.Length);
System.Drawing.Image image1 = System.Drawing.Image.FromS tream(ms1, true);
string combinedTif = @"L:\\FINSYS\\FSMain\\C\\S ource\\B1. tiff";
Bitmap combinedBitmap = new Bitmap(Math.Max(image.Widt h, image1.Width), image.Height + image1.Height);
using (Graphics combinedGraphics = Graphics.FromImage(combine dBitmap))
{
combinedGraphics.Clear(Col or.Black);
combinedGraphics.DrawImage (image, new Point(0, 0));
combinedGraphics.DrawImage (image1, new PointF(0, image.Height));
if (File.Exists(combinedTif))
{
File.Delete(combinedTif);
}
combinedBitmap.Save(combin edTif);
B.tiff
The bad news is that the front check image is taking up about 1/4 of the top of the screen and the back check image is taking up about 1/4 of the bottom half of the screen, which makes their contents hard to read.
Do you know how to revise this code so that the front check image will take up the entire upper half of the screen and the
back check image will take up the entire bottom half of the screen?
I have attached a display of the (small) size and the position of the 2 check images on the screen.
MemoryStream ms = new MemoryStream(bytesFrImg, 0, bytesFrImg.Length);
ms.Write(bytesFrImg, 0, bytesFrImg.Length);
System.Drawing.Image image = System.Drawing.Image.FromS
MemoryStream ms1 = new MemoryStream(bytesBkImg, 0, bytesBkImg.Length);
ms1.Write(bytesBkImg, 0, bytesBkImg.Length);
System.Drawing.Image image1 = System.Drawing.Image.FromS
string combinedTif = @"L:\\FINSYS\\FSMain\\C\\S
Bitmap combinedBitmap = new Bitmap(Math.Max(image.Widt
using (Graphics combinedGraphics = Graphics.FromImage(combine
{
combinedGraphics.Clear(Col
combinedGraphics.DrawImage
combinedGraphics.DrawImage
if (File.Exists(combinedTif))
{
File.Delete(combinedTif);
}
combinedBitmap.Save(combin
B.tiff
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.