Quantcast
Channel: magick Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 1011

Commented Unassigned: Performance problem with group4 conversion [1226]

$
0
0
Hi,

I've detected some performance problem with fax group4 conversion, here I'll try to describe how to reproduce it:

From terminal I execute the command what takes about ( 3-5 seconds )
convert -threshold 80% -compress group4 C:\Users\DXD\Pictures\OKMSc
an\Images\2014-5-6\Scanned-1.jpeg C:\Users\DXD\Pictures\OKMScan\Images\2014-5-6\
Scanned-2.jpeg C:\Users\DXD\Pictures\OKMScan\Images\2014-
5-6\pdf4.pdf

But when I try same action from my source code it takes several minutes ( more than 3 minutes ), here's mu method
public void convertToPdf(List<String> pathList, int percentage)
{
int number = 0;
if (pathList != null && pathList.Count > 0)
{
if (!existFolder(destPath + folderRoot, folderName))
{
createFolder(destPath + folderRoot, folderName);
}
number = findLastFile(destPath + folderRoot + folderName) + 1;
using (MagickImageCollection collection = new MagickImageCollection())
{
foreach (var path in pathList)
{
MagickImage image = new MagickImage(path);
image.Threshold(percentage);
image.CompressionMethod = CompressionMethod.Group4;
collection.Add(image);
}
collection.Write(destPath + folderRoot + folderName + "\\" + fileName + "-" + number.ToString() + ".pdf");
}
}
}

To execute simply provide a list of file paths. The method takes a lot of time in line collection.Write

Note: I'm trying with 5 color jepg files with about 900kb and 3307x4677px
Comments: ** Comment from web user: pherrera **


Additional information:
With images with equal or less 300 dpi seems goes right, but with 600 dpi or upper gets this kind of problem.


Viewing all articles
Browse latest Browse all 1011

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>