Android Question Write large bitmap in sections to file?

Discussion in 'Android Questions' started by Robert Valentino, Apr 8, 2015.

  1. Robert Valentino

    Robert Valentino Well-Known Member Licensed User

    I use to build a bitmap in memory (writing bitmaps to a canvas in sections Upper Left, Upper Right, Lower Left, Lower Right)
    Then I would BitmapPlus to Rescale the image to 66% of its size and use it again to Reduce the Colors.
    Finally I would write the file out using the GIF library because it wrote the smallest file (JPG and PNG were bigger)

    The problem I have now the bitmap I am trying to create is 5078 x 806 and could be twice that size if the user selects a lot of options. Which is WAY out of memory.

    How can I build a bitmap to a file using as little memory as possible?

    Is there anyway after building to a file to rescale it without reading it in? (reduce colors would also be nice)

    Convert it to GIF would be nice as well (for some reasons lower JPG and PNG options made the file not as nice to look at)

    Thanks for any help

    BobVal
     
  2. Peter Simpson

    Peter Simpson Expert Licensed User

  3. Robert Valentino

    Robert Valentino Well-Known Member Licensed User

    Maybe, but I really do not want to take the user to a different app to do this.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice