Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
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
Medium Priority
?
76 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 23

Accepted Solution

by:
Ioannis Paraskevopoulos earned 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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 document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

670 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