I wrote a C# console application that reads a bank input file and writes a tif output file of the front image and back image of checks.
An input file instructs me as to the starting position and length of the 2 images (front and back) of each check within the bank input file.
Each front and back image of checks begins with the value "II*".
Thus, for the first check, I write out "II*" followed by the remaining bytes that comprise the remainder of the front image.
Then I write out "II*" followed by the remaining bytes that comprise the remainder of the back image.
And I repeat this process for every check in the input file.
When I open the tif file, it displays the front image of the check.
There is a navigation button to display the back image of the check.
If I click on the navigation button a few times, I can finally see the back image of the check.
Do you know if there is a way to write out the tif file so that each check is comprised of the lead characters "II*" followed by the front and back image of a check (in other words 1 "II*" value per check?
Here is a snippet of my code:
//intpos1 is assigned the record size of the Front Check Image
Int32 intpos1 = BitConverter.ToInt32(bytes1, 0);
//the lrecl for type 5 records with a fixed length at 252 bytes
//the Front and Back Check Image record sizes
//mulitplier1 is assigned then record size divided by 252 to find the number of whole lrecls
//and rounded up for any partial remainder less than 252
Int32 multiplier1 = (Int32)Math.Min(Math.Floor(intpos1 / 252D) + 1, Math.Ceiling(intpos1 / 252D));
Int32 intpos1revised = 252 * multiplier1;
//"bytes2" array is assigned the value of the record size of the Back Check Image record in
//positions 55 to 58 but since the index is 0 based, we begin the Skip value at position 54.
Byte bytes2 = res.Skip(54).Take(4).ToArray();
//intpos2 is assigned the record size of the Back Check Image (position 55 of the 58 type records
Int32 intpos2 = BitConverter.ToInt32(bytes2, 0);
Int32 multiplier2 = (Int32)Math.Min(Math.Floor(intpos2 / 252D) + 1, Math.Ceiling(intpos2 / 252D));
//The Back Image size value is rounded up to the next highest multipe of 252, the lrecl for type 55 records
Int32 intpos2revised = 252 * multiplier2;
using (FileStream fs = new FileStream(bankFilePath, FileMode.Create))
using (BinaryWriter bwrite = new BinaryWriter(fs))
foreach (var arr in result)