|
Adam,
Thanks for answering my post. Yes, the 4 planes are in seperate image files. Even though I am displaying the image files, I need to get the cmyk to a managable combined file that has the correct colors. I have used the colormerge() function originally, but that is where the colors aren't correct. I load the 4 bitmaps into a LBitmap Array, do a ColorMerge() with a COLORSEP_CMYK parameter and the 4 files, but the colors are incorrect. I have been able to get the colors properly and into a rgb tif file, but the process is somewhat tedious. The files are 150 dpi tif files all around 350kb. I have posted the code that works, but the process takes about 65 seconds to merge the cmyk to the rgb tif file. I also have to create the file as a cmyk, save it, then reopen it and save it again as a tif lzw. Is there anyway to skip the save and reopening the file? The loading portion of the cmyk file into the LBitmap is what takes about 45 seconds? What I think would work is passing a FILE_TIFLZW into the SaveCMYKArray(), but it is errors as an invalid parameter. Anyways, any help to speed up the processing of the file would be greatly appreciated. The colors are now correct for the tif file and loads quickly into the bitmap. It is just the process of converting the 4 planes into the rgb tif file with the correct colors and in a reaonable process time. Thanks for any help.
Thanks,
Rich
LBitmap Planes[4]; int stat = Planes[0].Load((L_TCHAR*)(LPCTSTR)PageLocation); Planes[0].Invert();
stat = Planes[1].Load((L_TCHAR*)(LPCTSTR)PageLocation); Planes[1].Invert();
stat = Planes[2].Load((L_TCHAR*)(LPCTSTR)PageLocation); Planes[2].Invert();
stat = Planes[3].Load((L_TCHAR*)(LPCTSTR)PageLocation); Planes[3].Invert();
pBITMAPHANDLE CMYKHandlesArray[4] = { Planes[0].GetHandle(), Planes[1].GetHandle(), Planes[2].GetHandle(), Planes[3].GetHandle()};
// Save as cmyk CString FileName = "C:\\Test.tif"; LFile LeadFile; LeadFile.SetFileName(FileName.GetBuffer(1)); stat = LeadFile.SaveCMYKArray(CMYKHandlesArray, 4, FILE_TIFLZW_CMYK, 8, 2, 0, NULL);
// Open and save as rgb LBitmap NewBitmap; stat = NewBitmap.Load(FileName.GetBuffer(1)); stat = NewBitmap.Save(FileName.GetBuffer(1), FILE_TIFLZW, 8, PQ1, 0 );
|