Posted:
Thursday, April 2, 2015 3:22:42 AM(UTC)
This message was posted before the current version of LEADTOOLS was released and may no longer be applicable.
Ok problem solved. Thank you.
Posted:
Wednesday, April 1, 2015 5:57:43 AM(UTC)
This message was posted before the current version of LEADTOOLS was released and may no longer be applicable.
If you mean that the result file (After Merge) is gray, I noticed that your code is saving the result with "RasPdfG4" compression (or no compression at all) and 1-BPP. One-bit images cannot have more than 2 colors, in your case black and white. The gray shades you see are probably the effect of dithering or paint scaling. Try to save it as RasPdfLzw or RasPdfJpeg411 and set the Bits per pixel to 24.
If the problem didn't solved , isolate the problem in small working project(not your full application) and send it to me. Also, provide sample images that shows the problem.
Note: Make sure to put the files in a ZIP or RAR file to ensure our server delivers them correctly and send us the uploaded file name.
Posted:
Tuesday, March 31, 2015 5:08:02 AM(UTC)
This message was posted before the current version of LEADTOOLS was released and may no longer be applicable.
I have following 2 methods:
1. Convert PDF to Tiff
string loadfile = @"D:\Data\PDF_Farbe\PDF091.pdf";
string savefile = @"D:\Data\newTEST\PDF091.tiff";
string saveMultifiles = @"D:\Data\newTEST\sectest{0}.tiff";
RasterCodecs.Startup();
RasterCodecs codecs = new RasterCodecs();
LeadTools_RasterSupport_Unlock();
RasterImage image;
CodecsImageInfo imgIngfo = codecs.GetInformation(loadfile, true);
int count = imgIngfo.TotalPages;
for (int i = 1; i <= count; i++)
{
image = codecs.Load(loadfile, 32, CodecsLoadByteOrder.Rgb, i, i);
codecs.Save(image, string.Format(saveMultifiles, i), RasterImageFormat.Tif, 1, 1, 1, 1, CodecsSavePageMode.Append);
}
2. Merge PDFs
List<string> pdfFileList = new List<string>();
pdfFileList.Add(@"D:\Data\PDF_Farbe\PDF091.pdf");
pdfFileList.Add(@"D:\Data\PDF_Farbe\PDF091_1.pdf");
pdfFileList.Add(@"D:\Data\PDF_Farbe\PDF091_2.pdf");
pdfFileList.Add(@"D:\Data\PDF_Farbe\PDF091_3.pdf");
pdfFileList.Add(@"D:\Data\PDF_Farbe\PDF091_4.pdf");
foreach (string str in pdfFileList)
{
image = codecs.Load(str);
codecs.Save(image, @"D:\Data\newTEST\testPDF.PDF", RasterImageFormat.RasPdfG4, 1, 1, image.PageCount, 1, CodecsSavePageMode.Append);
}
but the output is gray, i want it in color. How can i do this in both?
Posted:
Monday, December 20, 2010 5:55:14 AM(UTC)
This message was posted before the current version of LEADTOOLS was released and may no longer be applicable.
Maen,
Again thanks for helping me with trying to calculate the pixels. In stepping back, I take 4 1-bit (CMYK) tiff files and merge them into an 8-bit color image using the SaveCMYKArray() function. I then pass this image to another application that needs to calculate the pixels colors used to create that image. For example in a 10 pixel by 10 pixel region, how many of those pixels were used from from the original 4 images to create that color. In that same 10x10 region, how many of those 100 pixels were from the cyan separation originally? The 1-bit tiff file pixels are either white or black used to create the color image. I am trying to track back to cyan, magenta, yellow and black, to calculate how many black pixels in that region there were in each of the separations to create the color. I thought by performing a separation on that same merged cmyk color file, I could separate into the colors and count the number of black pixels of that region? This would give me the percentages I was looking for. Using the 10x10 pixel example, there might be 100% cyan, 20% magenta, 30% yellow, and 70% black, used to make the color of that region. Hopefully that is a little more clear? Thanks again for helping me.
Thanks,
Rich
Posted:
Wednesday, February 13, 2008 3:40:42 AM(UTC)
This message was posted before the current version of LEADTOOLS was released and may no longer be applicable.
Never mind, I figured it out. Actually this method is 65 times faster than doing the same with GDI+.
LeadTools is the best!
Thanks a billion,
Kaushik