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
Jdelagarza  
#1 Posted : Thursday, April 5, 2007 8:16:49 AM(UTC)
Jdelagarza

Rank: Member

Groups: Guest
Joined: 7/6/2005(UTC)
Posts: 16

It seems when I use the code below with the first red entry listed as 1bppIndexed, and the second red entry ommitted, the resulting image is all black.

If I add the red entries, the resulting image comes out fine, but I'm simply trying to copy a portion of a 1bppIndexed (ccitt4 compressed TIFF image) to a new file, and the conversion from 1bpp to 24bRgb and then back again is adding quite a delay to the process.

Am I missing something here? Or is copying from 1bppIndexed to a new 1bppIndex bitmap not supported?

Code:
        Dim bmpSource As New Aurigma.GraphicsMill.Bitmap
        Dim bmpDest As Aurigma.GraphicsMill.Bitmap


            
        Dim tifReader As New Aurigma.GraphicsMill.Codecs.TiffReader(strOldFileName)

            

        tifReader.Open(strOldFileName)

            
        With tifReader.LoadFrame(0)
            .GetBitmap(bmpSource)

            Dim rctSource As Rectangle = GetSourceRect()
            
            bmpDest = New Aurigma.GraphicsMill.Bitmap(Aurigma.GraphicsMill.RgbColor.White, .Width, rctSource.Height, PixelFormat.Format24bppRgb)

            bmpSource.Draw(bmpDest, New Rectangle(0, 0, 0, 0), rctSource, Transforms.CombineMode.Copy, 0, Transforms.InterpolationMode.HighSpeed)
        End With

            
        bmpDest.ColorManagement.Convert(PixelFormat.Format1bppIndexed)
        bmpDest.Save(strNewFileName, New Codecs.TiffEncoderOptions(Codecs.CompressionType.Ccitt4))
       
        bmpSource.Dispose()
        bmpDest.Dispose()

Edited by user Tuesday, December 18, 2007 4:06:37 PM(UTC)  | Reason: Not specified

Alex Kon  
#2 Posted : Thursday, April 5, 2007 10:08:04 PM(UTC)
Alex Kon

Rank: Advanced Member

Groups: Guest
Joined: 1/31/2005(UTC)
Posts: 458

Was thanked: 5 time(s) in 5 post(s)
Hello,

Which version of the GraphicsMill for .NET do you use? I've tried to draw 1bppIndexed on another 1bppIndexed bitmap - it works fine with current version 4.0 of the library. Please download the latest version and try it out.

Jdelagarza  
#3 Posted : Friday, April 6, 2007 1:36:17 AM(UTC)
Jdelagarza

Rank: Member

Groups: Guest
Joined: 7/6/2005(UTC)
Posts: 16

I have version 3.1, but I tried it in version 4.0 and it seemed to work. Is there an update available to make this work in 3.1?

Edited by user Tuesday, December 18, 2007 4:06:51 PM(UTC)  | Reason: Not specified

Dmitry  
#4 Posted : Sunday, April 8, 2007 5:48:11 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,

You can upgrade your Graphics Mill 3.1 for .NET to Graphics Mill 4.0 for .NET. More information you can read in the Graphics Mill for .NET section of our site.

Sincerely yours,

Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!

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