Rank: Member
Groups: Guest
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
|
|
|
|
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, 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 |
|
|
|
|
Rank: Member
Groups: Guest
Joined: 5/31/2006(UTC) Posts: 20
|
Hi Dmitry, thx a lot! Your correction really improved my Application. regards Christian
|
|
|
|
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.