Android Question Canvas.DrawBitMap works diffrent under Android 5.0 and 4.4 and below

Discussion in 'Android Questions' started by Bill Kantz, Jul 15, 2015.

  1. Bill Kantz

    Bill Kantz Member Licensed User

    The below snipet of code stacks gif file to create a final BMP for display. Run on 4.4 or below it works fine. When the code is run on 5.0 only the last gif is shown as if all the other prior gif are being overwritten instead of merged.

    Code:
    Dim d As Bitmap
        d.Initialize(
    File.DirInternal, Station & "_County_Short.gif")
        C.DrawBitmap(d,
    Null,dr)

        
    Dim d As Bitmap
        d.Initialize(
    File.DirInternal, Station & "_Highways_Short.gif")
        C.DrawBitmap(d,
    Null,dr)


        
    Dim d As Bitmap
        d.Initialize(
    File.DirInternal, Station & "_City_Short.gif")
        C.DrawBitmap(d,
    Null,dr)

        
    Dim d As Bitmap
        d.Initialize(
    File.DirInternal, Station & "_N0R_Legend_0.gif")
        C.DrawBitmap(d,
    Null,dr)

        
    File.Delete(File.DirInternal,"b.bmp")
        
    File.Delete(File.DirInternalCache, "b.bmp")
       
        
    Dim b As Bitmap
       
        bout = 
    File.OpenOutput(File.DirInternal, "b.bmp"False)
        b.WriteToStream(bout,
    100,"JPEG")
        bout.close
       
        
    Dim tmp As Bitmap
        tmp.Initialize(
    File.DirInternal,"b.bmp")
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Can you upload a small project that demonstrates this issue?
     
  3. Bill Kantz

    Bill Kantz Member Licensed User

    Here is a small Project to demonstrate.
     

    Attached Files:

  4. Bill Kantz

    Bill Kantz Member Licensed User

    Closer investigation with Genny Motion the error occurs at Android 4.4.4 and works 4.4.2
     
  5. Bill Kantz

    Bill Kantz Member Licensed User

    Could if have something to do with:

    HAS_ALPHA_LAYER_SAVE_FLAG
     
Loading...