This forum contains outdated content and is available for reading only. Please contact technical support if you have any questions.

Notification

Icon
Error

Options
Go to last post Go to first unread
camelord  
#1 Posted : Sunday, September 10, 2006 6:59:37 PM(UTC)
camelord

Rank: Member

Groups: Guest
Joined: 5/31/2006(UTC)
Posts: 20

Hi,

i have a Problem with creating Images.

I need to create about 100000 in a Row.

With this Code, it lasts nearly a second per Image.

Code:
            Aurigma.GraphicsMill.Bitmap theTiffFile = myTiffFile;
            theTiffFile.ColorProfile = Aurigma.GraphicsMill.ColorProfile.FromSrgb(); ;
            theTiffFile.ColorManagement.ColorManagementEnabled = true;
            theTiffFile.ColorManagement.CmykColorProfile = new Aurigma.GraphicsMill.ColorProfile(theProfilePath); ;
            theTiffFile.ColorManagement.TransformationIntent = Aurigma.GraphicsMill.Transforms.ColorTransformationIntent.RelativeColorimetric;
            //the next line lasts long
            theTiffFile.ColorManagement.ConvertToContinuous(Aurigma.GraphicsMill.ColorSpace.Cmyk, false, false);
            string theFileName = theParameter.Counter.ToString("000000");
            System.IO.MemoryStream theMemoryStream = new System.IO.MemoryStream();
            System.IO.FileStream theFileStream = System.IO.File.Create(myFilePath + @"\" + theFileName + ".tif");
            //the next line lasts long
            theTiffFile.Save(theMemoryStream, new Aurigma.GraphicsMill.Codecs.TiffEncoderOptions(CompressionType.None));
            theMemoryStream.Capacity = (Int32)theMemoryStream.Length;
            theFileStream.Write(theMemoryStream.GetBuffer(), 0, theMemoryStream.GetBuffer().Length);
            theFileStream.Flush();
            theFileStream.Close();
            theMemoryStream.Close();
            theMemoryStream.Dispose();
            theFileStream.Dispose();
            theTiffFile.Dispose();

Do you have an idea, how i can fasten the convert and save part?

regards

Christian

Edited by user Wednesday, December 19, 2007 2:44:53 PM(UTC)  | Reason: Not specified

Dmitry  
#2 Posted : Sunday, September 10, 2006 7:25:40 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Guest
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Hello Christian,

Your source code is OK. The problem is in color management, it is rather slow operation. If you disable this option - the process will speed up.

Unfortunately there is no way to speed up conversion from one color space to another using color management.

Sincerely yours,

Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!

camelord  
#3 Posted : Sunday, September 10, 2006 7:39:10 PM(UTC)
camelord

Rank: Member

Groups: Guest
Joined: 5/31/2006(UTC)
Posts: 20

ok, but if i diable Color Management, The Colors look different.

Is it because of the ColorProfile, that converts the Image to CMYK, or is it converting without Color Management, converts wrong Colors?

Dmitry  
#4 Posted : Sunday, September 10, 2006 8:15:28 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Guest
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Color management helps to convert colors from one color space to another with minimum difference. Unfortunately if you need color compliance - you have to use color management.
Sincerely yours,

Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!

Users browsing this topic
Guest (3)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.