Coder Social home page Coder Social logo

Comments (18)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
Hi. Thanks for the report.

Can you attach a screenshot of what you are getting?  And, if possible, the SVG 
file as well?

Original comment by [email protected] on 3 Jul 2014 at 8:41

from androidsvg.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
As you can see the web browser rendered version is crisp and sharp where as the 
android is blurry.. maybe it's a anti-alias thing but doesn't see as sharp as 
vector graphics should be imo.

Thanks for your time looking into this. I'm looking to use this library in my 
next project and need good clear and sharp graphics.

Original comment by [email protected] on 4 Jul 2014 at 6:07

Attachments:

from androidsvg.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
I've even attempted to put the svg in the assets folder and reading it via an 
input stream. i get the same results.

Original comment by [email protected] on 4 Jul 2014 at 6:09

from androidsvg.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
Can you show me (or send me) the code you are using to render the SVG please?  
To me it is looking like the SVG has been rendered into a bitmap that has then 
been scaled up.

Original comment by [email protected] on 4 Jul 2014 at 8:18

from androidsvg.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
Here is my simple example code i'm using... Regardless of where i pull the SVG 
source file, i get the same results.       

        SVGImageView imageView = new SVGImageView(this);
        imageView.setBackgroundColor(Color.WHITE);
        try {
            InputStream open = getAssets().open("test/Test.svg");
            SVG svg = SVG.getFromInputStream(open);
            Picture renderToPicture = svg.renderToPicture();
            Drawable drawable = new PictureDrawable(renderToPicture);
            imageView.setImageDrawable(drawable);
        } catch (Exception e) {
            Log.e("MainActivity", "Unable to open SVG File. " + e);
        }

Original comment by [email protected] on 4 Jul 2014 at 8:33

from androidsvg.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
[deleted comment]

from androidsvg.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
Your code looks okay. Although when using the SVGImageView in AndroidSVG, all 
you should need to do is:

SVGImageView imageView = new SVGImageView(this);
imageView.setBackgroundColor(Color.WHITE);
imageView.setImageAsset("test/Test.svg");

You should be getting crisp graphics.  Assuming there is nothing especially 
weird about your SVG file.  Is it just the simple path or polygon that it looks 
like?

Perhaps you could send me the rest of that source file?  Maybe I can spot 
something that isn't obvious from this mall code sample.

Another thing that is odd is the difference in how those two stars turned out.  
As if the fill-rule was not being handled properly.  AndroidSVG should be 
rendering that correctly.

Original comment by [email protected] on 4 Jul 2014 at 12:29

from androidsvg.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
Yeah, totally understand that logic. I'll send the example file when i get home 
this evening. It looks to me as if the whole thing lack clarity. Like every 
element is being recognized, and rendered, but when it come to displaying the 
graphic it seems to be losing quality. I've seen this a few times within java 
graphics rendering and perhap it's just me.... however with the code being as 
simple and by example as possible it just seems as if something is not quite 
right.


Original comment by [email protected] on 7 Jul 2014 at 5:56

from androidsvg.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
Sorry for the late reply, been really busy lately. I've attached a copy of a 
test sag that is also blurry... i can't seem to find the old  file.

Original comment by [email protected] on 15 Jul 2014 at 7:20

Attachments:

from androidsvg.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
The yellow car file seems to work fine for me.  It doesn't come out blurry.  
Here is a screenshot from my test program.


Original comment by [email protected] on 16 Jul 2014 at 4:17

Attachments:

from androidsvg.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
Here's my result on a Samsung Galaxy 10.1 (4.0.2)

Original comment by [email protected] on 16 Jul 2014 at 2:28

Attachments:

from androidsvg.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
How are you creating these screenshots?  The screen grab feature built into 
Android saves PNGs.

Even the text is blurry in your screenshots, which presumably it is not the 
case in the on-screen version.  So clearly the conversion to JPEG is causing 
some of the problem.

Can you send me a proper (ie PNG) screen grab please. To do that, press Volume 
Down and the Power button at the same time.

Original comment by [email protected] on 16 Jul 2014 at 2:33

from androidsvg.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
I'm using the built in capture... The screen looks just like the image though. 
Seems as if the button combination doesn't work.

Original comment by [email protected] on 16 Jul 2014 at 2:57

from androidsvg.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
You have to hold them both down for a second or two.  If you are not using 
that, then what "built-in" capture are you using?

Please send a PNG, not a JPEG.

Original comment by [email protected] on 16 Jul 2014 at 3:36

from androidsvg.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
Both screenshots look the same. I can send it if you want but i don't see any 
differences.

Original comment by [email protected] on 16 Jul 2014 at 4:40

from androidsvg.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
Could you explain how you are creating your JPEG screenshots please?  And what 
method you used to create the PNG one.

Also what device are you testing on, and which version of Android?

Original comment by [email protected] on 16 Jul 2014 at 9:17

from androidsvg.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
The first image was just the built in default screenshot tool. The other one 
was the method you suggested. Both saves the screen shot to the gallery. I'm 
using a Galaxy Tab 10.1 running 4.0.2. On the screen it's blurry, so when i 
save a snapshot it renders the screen accurately to an image that is equally 
blurry.

Original comment by [email protected] on 17 Jul 2014 at 6:11

from androidsvg.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
Ah, I see, you were talking about the screen capture that Samsung put into 
their version of Android.  The only "official" screenshot tool is the one 
Google added in the Ice Cream Sandwich release.

Since the blurriness also affects the text in the title bar.  I have to assume 
that it is some issue with your device, or perhaps your tablet settings.  It 
doesn't seem like it could be an issue with AndroidSVG.

So, for now, I'm going to close this issue as "Invalid".  If you disagree, 
follow-up and we can discuss further.

Best of luck finding the answer.



Original comment by [email protected] on 17 Jul 2014 at 8:52

  • Changed state: Invalid

from androidsvg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.