Solved

I am usng C# with VS2010 and .Net Framework 4.0. Can you think of a way to process the 2 functions together, one after the other each time the 1st function is called?

Posted on 2016-09-09
1
71 Views
Last Modified: 2016-09-10
I am writing a C# application using VS2010 and .Net Framework 4.0 that merges 2 TIF image files at a time that represents the front image and back image of a particular check by calling a function titled ProcessImage in the attached .txt file.

Thus, ProcessImage merges, for ex: check #1, Front image of a check WITH check #1 the Back image of a check ->
into check #1 Front/Back image of a check.

ProcessImage is called from a loop, and merges 2 compressed TIF check images at a time into 1 TIF image from a directory.
The resulting TIF image is very large in size. I am running out of disk space in the directory because the application is processing thousand of check images that were compressed and each time I write out a compressed check, it is no longer compressed.

Once all the TIF images have been merged, I then process the 2nd set of statements in the attached .txt file that compresses all the merged check images.

What I would like to do is rewrite my code so that each time ProcessImage is called for a particular check to merge, this function merges the 2 check images into 1 check image file AND THEN this function calls the second set of statements in the attached .txt file to compress the newly created merged check image file.

Currently my application only calls the 2nd set of statements after all the checks have been merged and it loops through all the merged checks to compress them. The FOR EACH process should be removed from this set of statements since it should only process 1 check.
 
I want to revised this second function so that it only compresses the check that was just processed by the function ProcessImage.

 

Do you know a way to process the attached 2 functions together in the .txt file so that they are performed, one after the other, each time the application calls ProcessImage?
ImageProcess.txt
0
Comment
Question by:zimmer9
1 Comment
 
LVL 23

Accepted Solution

by:
Ioannis Paraskevopoulos earned 500 total points
ID: 41792230
Hi,

Why are you trying to go through all the .out files each time. You already know which out file you have just created, it is in the tif3 variable. So in your foreach section if you (instead of using foreach of course) replace the variable 'file' with the variable 'tif3' it should process the newly created .out file each time you call Process Image.

Giannis
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question