jens simonsen#32271
HI. Im trying to make a simple convert from tiff to jpeg using some the examples here how ever i keep running into the error : The profile doesn't match to color space required on some of the tiff files but not all of them.
i also noticed this started after i installed the newest of the graphics mill library.
the variations i have tried is thus:
those i just some i have tried all of then produce the same error.
i have to ask you guys what am i doing wrong now 🙂. i simply cant get my head around on what im missing. 😞
regrds jens
i also noticed this started after i installed the newest of the graphics mill library.
the variations i have tried is thus:
using (var reader = new TiffReader(filepath))
using (var converter = new ColorConverter(PixelFormat.Format32bppCmyk))
using (var writer = new JpegWriter(outputpath + @"\" + filename + ".jpg"))
{
if (reader.AdobeResources != null)
{
var adobeResources = new AdobeResourceDictionary();
for (var i = 2000; i <= 2997; i++)
{
if (reader.AdobeResources.Contains(i))
{
adobeResources[i] = reader.AdobeResources[i];
}
}
writer.AdobeResources = adobeResources;
}
Pipeline.Run(reader + converter + writer);
}
using (var reader = ImageReader.Create(filepath))
using (var converter = new ColorConverter(PixelFormat.Format32bppCmyk))
using (var writer = ImageWriter.Create(outputpath + @"\" + filename + ".jpg"))
{
converter.ColorManagementEngine = ColorManagementEngine.LittleCms;
converter.DeviceLinkProfile = new ColorProfile(@"profiles\ISOcoated_v2_to_PSOcoated_v3_DeviceLink.icc");
converter.DestinationProfile = new ColorProfile(@"profiles\PSOcoated_v3.icc");
Pipeline.Run(reader + converter + writer);
}using (var reader = new TiffReader(sourceImagePath))
using (var writer = new JpegWriter(outImagePath))
using (var colorConverter = new ColorConverter(writer.GetAppropriatePixelFormat(reader.PixelFormat)))
{
writer.AdobeResources = reader.AdobeResources;
Pipeline.Run(reader + colorConverter + writer);
}those i just some i have tried all of then produce the same error.
i have to ask you guys what am i doing wrong now 🙂. i simply cant get my head around on what im missing. 😞
regrds jens