Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
camelord  
#1 Posted : Monday, November 20, 2006 7:05:57 PM(UTC)
camelord

Rank: Member

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

Hi,

i am converting an Image to an 1Bpp Indexed One

Code:
Aurigma.GraphicsMill.Bitmap theTiffImage = new Aurigma.GraphicsMill.Bitmap();
            theTiffImage.Unit = Aurigma.GraphicsMill.Unit.Mm;
            theTiffImage.HorizontalResolution = 300;
            theTiffImage.VerticalResolution = 300;
            theTiffImage.Create(80, 50, Aurigma.GraphicsMill.PixelFormat.Format32bppArgb);

...

certain Images will be drawn onto theTiffImage Bitmap

...

Code:
theTiffFile.ColorManagement.ConvertToIndexed(1, Aurigma.GraphicsMill.ColorPaletteType.GrayScale, new Aurigma.GraphicsMill.ColorPalette(theTiffFile, theTiffFile.HasAlpha));

This lasts very long!

Is there a way to fasten ist?

reagards

Christian

Edited by user Tuesday, December 18, 2007 8:11:24 PM(UTC)  | Reason: Not specified

Dmitry  
#2 Posted : Tuesday, November 21, 2006 8:39:19 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

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

If you want to convert your RGB image to bicolor indexed image, you should not create bicolor palette for image (it always has two colors: black and white :) ), it is rather time expensive operation. Your code takes 0.3 sec on my workstation. I have modified you code sample, now it takes about 0.1 sec:

Code:
Aurigma.GraphicsMill.Bitmap theTiffImage = new Aurigma.GraphicsMill.Bitmap();            
theTiffImage.Unit = Aurigma.GraphicsMill.Unit.Mm;            
theTiffImage.HorizontalResolution = 300;            
theTiffImage.VerticalResolution = 300;            
theTiffImage.Create(80, 50, Aurigma.GraphicsMill.PixelFormat.Format32bppArgb);
theTiffImage.ColorManagement.ConvertToIndexed(1, Aurigma.GraphicsMill.ColorPaletteType.Bicolor, null);

Edited by user Tuesday, December 18, 2007 8:11:43 PM(UTC)  | Reason: Not specified

Sincerely yours,

Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!

camelord  
#3 Posted : Tuesday, November 21, 2006 10:41:57 PM(UTC)
camelord

Rank: Member

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

Hi Dmitry,

thx a lot! Your correction really improved my Application.

regards

Christian

Users browsing this topic
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.