Hello,
I want to draw text on a loaded image but I don't manage.
The first problem I had was the incompatibility between the PixelFormat.
The error was :
Code:Détails de l'exception: Aurigma.GraphicsMill.UnsupportedPixelFormatException: The specified pixel format is not supported.
And the code :
Code:
Dim stream As New System.IO.MemoryStream(image)
Dim bitmap As New Aurigma.GraphicsMill.Bitmap(stream)
Dim bitmapText As New Aurigma.GraphicsMill.Bitmap(Aurigma.GraphicsMill.RgbColor.White, Bitmap.Width, Bitmap.Height, Aurigma.GraphicsMill.PixelFormat.Format24bppRgb)
with image : binary data
So, I employed BitsPerPixel, IsRGB, HasAlpha and IsIndexed methods to have the correct PixelFormat of my bitmap. I got :
bitmap.BitsPerPixel : 8
bitmap.IsRGb : True
bitmap.HasAlpha : True
bitmap.IsIndexed : True
Then, I replaced "Format24bppRgb" by "Format8bppIndexed" and another error came to visit me :
Détails de l'exception: System.ArgumentException: Argument has an unappropriate value (CombineMode). (Between two indexed images only CombineModeCopy could be specifyed.).
So, I replaced "Aurigma.GraphicsMill.Transforms.CombineMode.Alpha" by "Aurigma.GraphicsMill.Transforms.CombineMode.Copy" in the Draw method and the result is a black image.
Can anyone help me? I don't know how to solve it. :'( :'(
Thank you very much,
Michel