Giter Club home page Giter Club logo

Comments (5)

Lonami avatar Lonami commented on May 23, 2024

And encoding as base64 can be done as follows (courtesy of Stack Overflow):

// Get the bytes array
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();  
bitmap.compress(Bitmap.CompressFormat.PNG, 100, byteArrayOutputStream);
byte[] byteArray = byteArrayOutputStream .toByteArray();

// Encode the bytes into base64
String encoded = Base64.encodeToString(byteArray, Base64.DEFAULT);

from simple-draw.

cbertelli avatar cbertelli commented on May 23, 2024

I would prefer the linked object without the Base64 string.
Il could at least help making the SVG the same size as the background image if there are no drawings outside it (meaning that the user is annotating the photo).
By the way, I would store the annotations in a database if allowed.

from simple-draw.

Lonami avatar Lonami commented on May 23, 2024

I would prefer the linked object without the Base64 string

If we use an absolute path, I think the .svg would be pretty useless once you move it out from the phone/tablet. If we use a relative path (or maybe just the name), then we need to store this mapping somewhere. I think it would be a tad bit trickier.

from simple-draw.

cbertelli avatar cbertelli commented on May 23, 2024

I would prefer something like the linked object in Inkscape:

    <image
       sodipodi:relref="IMG_20160708_231027.jpg"
       xlink:href="IMG_20160708_231027.jpg"
       y="462.69064"
       x="7.4576993"
       id="image1419"
       preserveAspectRatio="none"
       height="607.5"
       width="1080"
       style="image-rendering:auto" />

Anyway the problem is retaining the image position o using a canvas the same size as the picture if there are no drawings outside.

from simple-draw.

cbertelli avatar cbertelli commented on May 23, 2024

from simple-draw.

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.