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
64 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now