solunaire / vectrize Goto Github PK
View Code? Open in Web Editor NEW"Vectrize": A mobile version of the Primitive library developed by @fogleman to generate SVG images from raster ones. Developed by @rahulk64 and @jordanbuchman
"Vectrize": A mobile version of the Primitive library developed by @fogleman to generate SVG images from raster ones. Developed by @rahulk64 and @jordanbuchman
Need to figure out a way to load SVG images, both as thumbnails for the gallery and into a PhotoView to view, preferably using http://bigbadaboom.github.io/androidsvg/
In the Dashboard Gallery, there is a different thumbnail for the image taken from the camera than the image that's loaded by the Fullscreen Gallery.
When using the Camera option to take a picture to save and use in the library, the image is always saved 90deg rotated clockwise to what was taken (or, in other words, taken in the landscape even thought app is in portrait mode).
Right now, we are running into limitations where we can only send scaled-down images from the camera across to the Preview Activity, which decreases the quality of the overall image. We need to find a way to send over the Uri/Path instead of the image itself.
I have the framework for the button itself, we just need to implement it using JSON files in the next update
On the Options screen, have a button for resetting all the values to the default values.
Error message when using the back camera:
'CameraCaptureSession: Session 1: Failed to create capture session; configuration failed'
Doesn't appear when flipping camera and using front one.
Right now, if you choose an image from the gallery that is very high definition, like a professional photo with a high quality camera imported to the phone, then it takes a while for it to load such a high quality image when it doesn't need to. We should try scaling it down a bit, but not enough that it's (too) noticeable on the phone.
Instead of the background screen in MainActivity, it would be nice if, in the final version of the app, we could have an initial "tutorial" to walk users through the app, from the first screen all the way to saving the final "vectrized" image at the end.
Currently, there is an issue receiving URI from images that are not saved on the device itself but instead are backed up through Google Drive or Photos. Need to fix.
Right now, the "Choose Another Image" button is implemented in such a way that it reopens the Main Activity. Instead, move it to the Options Activity instead (easy fix)
How to Reproduce Issue: Run through Options Activity, click run, and let the Primitive Library start running. Then close app, (in my case through clicking open a new app from notifications), then return to Primitive, and either Cancel (in my case) or save, and it can't return to Main Activity
Error Log:
FATAL EXCEPTION: main
Process: com.solunaire.vectrize, PID: 4761
java.lang.RuntimeException: Unable to resume activity {com.solunaire.vectrize/com.solunaire.vectrize.MainActivity}: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=5, result=0, data=null} to activity {com.solunaire.vectrize/com.solunaire.vectrize.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.RecyclerView.setAdapter(android.support.v7.widget.RecyclerView$Adapter)' on a null object reference
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3645)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3685)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2898)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Caused by: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=5, result=0, data=null} to activity {com.solunaire.vectrize/com.solunaire.vectrize.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.RecyclerView.setAdapter(android.support.v7.widget.RecyclerView$Adapter)' on a null object reference
at android.app.ActivityThread.deliverResults(ActivityThread.java:4324)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3617)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3685)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2898)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.RecyclerView.setAdapter(android.support.v7.widget.RecyclerView$Adapter)' on a null object reference
at com.solunaire.vectrize.MainActivity.onActivityResult(MainActivity.java:208)
at android.app.Activity.dispatchActivityResult(Activity.java:7235)
at android.app.ActivityThread.deliverResults(ActivityThread.java:4320)
Needs to refresh after each update to the gallery, including adding/deleting images
Get this error when running when choosing a background:
W/Bundle: Key background expected String but value was a java.lang.Integer. The default value was returned.
W/Bundle: Attempt to cast generated internal exception:
java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
at android.os.BaseBundle.getString(BaseBundle.java:1121)
at com.solunaire.vectrize.FinishedPreviewActivity$2.run(FinishedPreviewActivity.java:126)
at java.lang.Thread.run(Thread.java:764)
Effectively, the background feature does not work
It would be nice to have a loading bar before any image gets posted on the FinishedPreviewActivity because for some images, it takes a bit of time for it to load and it would be better for the user than thinking the app froze or something.
The share button works when sharing with apps like Google Photos and other gallery apps, but not with Hangouts or other texting/messaging apps (either results in app crashes or errors).
When saving the image, or loading the RecyclerView in the Home Page Gallery, main thread is skipping frames. Should move these heavy actions off of main thread.
Delete, share, etc.
Should register an intent on PreviewActivity. Not sure best way to deal with received image (does it only come as bitmap, only as uri, or both?)
Quick Fix: get rid of the title in the Detail Activity
Allow images to be saved in other formats than just PNG
When trying to choose the Camera option (vs Gallery), it's not sending the URI but a byte array of the image itself, and the Primitive library is unable to use this. Need to change it to URI instead of byte array.
Or it stops in the middle...
Maybe has something to do with this:
E/Sharp: Failed parsing SVG
org.apache.harmony.xml.ExpatParser$ParseException: At line 126, column 8: not well-formed (invalid token)
at org.apache.harmony.xml.ExpatParser.parseFragment(ExpatParser.java:515)
at org.apache.harmony.xml.ExpatParser.parseDocument(ExpatParser.java:474)
at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:316)
at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:279)
at com.pixplicity.sharp.Sharp$SvgHandler.read(Sharp.java:1309)
at com.pixplicity.sharp.Sharp.getSharpPicture(Sharp.java:390)
at com.pixplicity.sharp.Sharp.getSharpPicture(Sharp.java:412)
at com.pixplicity.sharp.Sharp.getDrawable(Sharp.java:358)
at com.pixplicity.sharp.Sharp.into(Sharp.java:309)
at com.solunaire.vectrize.FinishedPreviewActivity$1.onEvent(FinishedPreviewActivity.java:83)
at android.os.FileObserver$ObserverThread.onEvent(FileObserver.java:123)
at android.os.FileObserver$ObserverThread.observe(Native Method)
at android.os.FileObserver$ObserverThread.run(FileObserver.java:86)
E/FileObserver: Unhandled exception in FileObserver com.solunaire.vectrize.FinishedPreviewActivity$1@d8df9ba
com.pixplicity.sharp.SvgParseException: org.apache.harmony.xml.ExpatParser$ParseException: At line 126, column 8: not well-formed (invalid token)
at com.pixplicity.sharp.Sharp$SvgHandler.read(Sharp.java:1317)
at com.pixplicity.sharp.Sharp.getSharpPicture(Sharp.java:390)
at com.pixplicity.sharp.Sharp.getSharpPicture(Sharp.java:412)
at com.pixplicity.sharp.Sharp.getDrawable(Sharp.java:358)
at com.pixplicity.sharp.Sharp.into(Sharp.java:309)
at com.solunaire.vectrize.FinishedPreviewActivity$1.onEvent(FinishedPreviewActivity.java:83)
at android.os.FileObserver$ObserverThread.onEvent(FileObserver.java:123)
at android.os.FileObserver$ObserverThread.observe(Native Method)
at android.os.FileObserver$ObserverThread.run(FileObserver.java:86)
Caused by: org.apache.harmony.xml.ExpatParser$ParseException: At line 126, column 8: not well-formed (invalid token)
at org.apache.harmony.xml.ExpatParser.parseFragment(ExpatParser.java:515)
at org.apache.harmony.xml.ExpatParser.parseDocument(ExpatParser.java:474)
at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:316)
at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:279)
at com.pixplicity.sharp.Sharp$SvgHandler.read(Sharp.java:1309)
at com.pixplicity.sharp.Sharp.getSharpPicture(Sharp.java:390)
at com.pixplicity.sharp.Sharp.getSharpPicture(Sharp.java:412)
at com.pixplicity.sharp.Sharp.getDrawable(Sharp.java:358)
at com.pixplicity.sharp.Sharp.into(Sharp.java:309)
at com.solunaire.vectrize.FinishedPreviewActivity$1.onEvent(FinishedPreviewActivity.java:83)
at android.os.FileObserver$ObserverThread.onEvent(FileObserver.java:123)
at android.os.FileObserver$ObserverThread.observe(Native Method)
at android.os.FileObserver$ObserverThread.run(FileObserver.java:86)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.