I try to render a svg to file to match the background and make a paralexBackground. The problem is that the render of the svg file is not pixel perfect. I'll explain.
I have this svg file, a blue square.
I render the file like that:
Using java Syntax Highlighting
- final PictureBitmapTextureAtlasSource textureSource = new SVGAssetBitmapTextureAtlasSource(
- aBase, source_svg_file, width, height);
- Bitmap pBitmap = null;
- try {
- pBitmap = textureSource.onLoadBitmap(Config.ARGB_8888);
- } catch (Exception e) {
- e.printStackTrace();
- Log.d(TAG, e.getMessage());
- }
- //Here i plan to cut that line of pixels...
- try {
- FileOutputStream out = new FileOutputStream(output_png_file);
- pBitmap.compress(Bitmap.CompressFormat.PNG, 100, out);
- } catch (Exception e) {
- e.printStackTrace();
- }
Parsed in 0.032 seconds, using GeSHi 1.0.8.4
And the result is a blue square, but in the last pixel of the right side, there is a line with transparent pixels... can i avoid that??
I'm thinking in some post-process the png to cut that last pixels.... but i prefer a clean solution....
Can anyone help me, please?
Thank you all.
