Giter VIP home page Giter VIP logo

Comments (8)

mronian avatar mronian commented on September 3, 2024

This feature does not exist in ImageDraw yet.

I am not familiar with Cairo, does this link(its a python example) help to convert a surface to the Image type?

from imagedraw.jl.

timholy avatar timholy commented on September 3, 2024

I would wager that Cairo is the way to go here. Convert to a surface, then write on it, and then extract the data again. I'm certain Cairo.jl could use some improvement/cleanup to make that easier. Cairo.jl was mostly written before we had the color types RGB24, ARGB32, Gray24, and AGray32, which could be leveraged to provide a much more Julian interface than "naked" UInt32 arrays. They've crept in a bit (I added some wrappers), but overall it's not exactly pretty.

I wonder if we want to make such capabilities part of ImageDraw, or whether there should be a separate ImageText package. If it were not for the issue of additional binary dependencies, I'd argue for putting it all in ImageDraw; but with the dependency problem, one could get into a situation where one couldn't use any of the features of the package simply because it couldn't be loaded. I don't know how problematic libcairo has been; I don't remember seeing a lot of bug reports about it.

from imagedraw.jl.

Evizero avatar Evizero commented on September 3, 2024

I wonder if we want to make such capabilities part of ImageDraw, or whether there should be a separate ImageText package. If it were not for the issue of additional binary dependencies, ...

For my very egoistic reasons I would vote to keep the dependencies of ImageDraw to a minimum. Egoistic because I would like a future version of UnicodePlots to use ImageDraw and ImageInTerminal to provide a lot of its functionality, and naturally I aim to keep UnicodePlots as compact as I can

from imagedraw.jl.

bjarthur avatar bjarthur commented on September 3, 2024

an alternative to Cairo is FreeType. @SimonDanisch has done most of what i need in the FreeTypeAbstraction module of GLVisualize. would it make sense to split that out into a separate package called ImageText?

from imagedraw.jl.

SimonDanisch avatar SimonDanisch commented on September 3, 2024

I'm actively working on some Julia/CPU only version of GLVisualize right now... This will bring most of this, I guess ;)
But will obviously take some time!

from imagedraw.jl.

bjarthur avatar bjarthur commented on September 3, 2024

@SimonDanisch can you please elaborate? all i need is to put text onto an image array. your FreeTypeAbstraction module is very close to doing that. but i don't need the rest of GLVisualize. are you saying you've already split it out into it's own package? if so, could you please share? if not, would you mind if i went ahead and did that? thanks.

from imagedraw.jl.

SimonDanisch avatar SimonDanisch commented on September 3, 2024

It actually was at some point: https://github.com/SimonDanisch/FreeTypeAbstraction.jl.
I might want to transfer that repo to JuliaGraphics first, though.
Feel free to update it with the current version in GLVisualize!

Well, you might still want a nice API, caching, fast resolution independent rendering, etc, which is what GLVisualize should offer at some point.
If you need it now and don't mind duplicating some work (for a simple version it should be very little duplication), go ahead and don't wait for GLVisualize! ;)

from imagedraw.jl.

bjarthur avatar bjarthur commented on September 3, 2024

i have a PR which enables one to render text into a matrix. so i'll close this issue, but would appreciate if everyone could provide feedback over there.

from imagedraw.jl.

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.