Do you know how I could rewrite my C# code to merge 2 TIFF files together into 1 TIFF file (called a multipage TIFF image)?

I wrote a C# console application that generates 2 files in binary format.

1 file is comprised of the front images of checks.

1 file is comprised of the back images of checks.

Here is a snippet of my code to create the 2 output files.

Do you know how I could rewrite this code to merge these 2 TIFF files together into 1 TIFF file (called a multipage TIFF image)?

I want to give the user the ability to read the front image of a particular check image and then read the back image of the same check.

Using my current set of 2 files, the user would have to open the first file of the front images of checks and navigate to a particular check.

Then the user would have to open the second file of the back images of checks and navigate to the same check that he/she is interested in viewing.

string bankFilePath = System.IO.Path.Combine(MyGlobals.BASE_DIR, MyGlobals.BASE_FILE_Name + ".ard1.out");
                using (FileStream fs = new FileStream(bankFilePath, FileMode.Create))
                {
                    using (BinaryWriter bwrite = new BinaryWriter(fs))
                    {
                        foreach (var arr in result)
                        {
                            bwrite.Write(arr);
                        }
                    }
                }

         
                string bankFilePath1 = System.IO.Path.Combine(MyGlobals.BASE_DIR, MyGlobals.BASE_FILE_Name + ".ard2.out");
                using (FileStream fs = new FileStream(bankFilePath1, FileMode.Create))
                {
                    using (BinaryWriter bwrite = new BinaryWriter(fs))
                    {
                        foreach (var arr1 in result1)
                        {
                            bwrite.Write(arr1);
                        }
                    }
                }
zimmer9Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AndyAinscowFreelance programmer / ConsultantCommented:
This might be useful to you:
http://stackoverflow.com/questions/6383123/merge-two-images-to-create-a-single-image-in-c-net

Basically it shows how to append one image (picture) to another.  You can then save the resulting image rather than trying to modify the binary files directly as are attempting at present.   (Let the system do the work for you, simpler than reinventing the wheel)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.