Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[swtchart-dev] GSoC 2020:Creating bitmaps with no restriction on resolution and display size

When creating bitmaps the main problem when changing resolution of the *.bmp file is that it loses its quality because of which datasets are not visible .
Is it possible that first we create .svg file of desired resolution and then convert it into .bmp in this way quality of display  is preserved.
One way to convert to .bmp would be as follows:
  Bitmap.Config conf = Bitmap.Config.ARGB_8888; 
          Bitmap bitmap = Bitmap.createBitmap(50, 50, conf);

          // Get a Canvas for the Bitmap
          Canvas  canvas = new Canvas(bitmap);

          // Read the SVG file
          SVG svg = SVGParser.getSVGFromInputStream(inputstream);
          // There are other ways to read an SVG file. See the SVGParser class for the others.

          // Get a Picture from the SVG and render it to the Canvas

Back to the top