Jdelagarza#1529
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?
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?
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()