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

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

Suggested Solutions

Title # Comments Views Activity
parse string in c# 5 41
I need help writing Unit Tests for my ASP.Net MVC application 5 40
How does GeoJson relates to Leaflet and Mapbox? 4 50
C# LINQ query question 11 33
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

751 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