Comments (18)
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.
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.
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.
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.
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.
[deleted comment]
from androidsvg.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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)
- SVGAndroidRenderer.processMaskBitmaps is very slow HOT 1
- SVGParser is not thread-safe [with fix] (SVG parse error: Invalid colour keyword: white) HOT 2
- Feature request: replace text HOT 6
- FAQ promotes extremely bad backward-compatibility practice HOT 6
- Image references missing SVG support. HOT 3
- Canvas changed after renderToCanvas HOT 1
- Position of Rectf ignored when renderToCanvas HOT 1
- Support for hardware acceleration
- Android version support HOT 1
- Android version support HOT 1
- Pattern fills are rendered with visible grid HOT 4
- Provide copy constructor or allow rendering to multiple viewBox at once HOT 3
- migrate the repository HOT 3
- Move project to Github HOT 1
- NullPointerException in 1.2.2-beta1 when parsing SVG document HOT 4
- SVGImageView crashes on Android 5.0 and higher HOT 5
- Proguard breaks reflective CSS selectors HOT 1
- java.lang.ArrayIndexOutOfBoundsException: length=0; index=-2 in SVGAndroidRenderer.arcTo(SourceFile:2572) HOT 1
- Incorrect rendering of SVG image HOT 5
- Unable to execute dex: Multiple dex files define HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from androidsvg.