Coder Social home page Coder Social logo

Comments (7)

hunger avatar hunger commented on May 23, 2024 1

@akshatvishu Of course you can work on this :-) Feel free to drop by in chat.slint.dev if you have questions! That usually works faster than raising an issue for everything:-)

from slint.

ogoffart avatar ogoffart commented on May 23, 2024

Thanks for your suggestion. I edited the title and description to make it more actionable as an issue in our issue tracker.
To answer the original question: this is not implemented right now.

from slint.

ogoffart avatar ogoffart commented on May 23, 2024

This should be fairly easy to implement.

In the resolving pass, we can detect such URL and store a ImageReference::EmbeddedData instead of ImageReference::AbsolutePath, around here

resource_ref: ImageReference::AbsolutePath(absolute_source_path),

from slint.

learncodingforweb avatar learncodingforweb commented on May 23, 2024
Image {
  source: @image-url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==");
}

Compiling slint_redis_camera_view v0.1.0
error: failed to run custom build command for slint_redis_camera_view v0.1.0

Caused by:
process didn't exit successfully: target/debug/build/slint_redis_camera_view-ffd86284a8902f59/build-script-build (exit status: 101)
--- stderr
error: Cannot find image file data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==
--> ui/app.slint:24:21
|
24 | source: @image-url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==");
| ^

thread 'main' panicked at build.rs:2:42:
called Result::unwrap() on an Err value: CompileError(["ui/app.slint:24: Cannot find image file data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=="])
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
[Finished running. Exit status: 101]

Cargo.toml

[build-dependencies]
slint-build="1.5"


[dependencies]
slint = "1.5"

from slint.

ogoffart avatar ogoffart commented on May 23, 2024

yes of course, this is not yet implemented yet. This is why the issue is tagged as "enhancement" (this is a feature request)

from slint.

akshatvishu avatar akshatvishu commented on May 23, 2024

yes of course, this is not yet implemented yet. This is why the issue is tagged as "enhancement" (this is a feature request)

Can i work on this?

from slint.

ogoffart avatar ogoffart commented on May 23, 2024

@akshatvishu , sure, thank you.

from slint.

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.