JuliaBooks / Books.jl

Create books with Julia

Home Page:https://huijzer.xyz/Books.jl/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make processing of images easier via multiple dispatch

rikhuijzer opened this issue · comments

The logic for processing images should be more easily user-extendable by allowing people to add extra image types and how to convert the image to SVG and PNG. So, interface could be as follows:

Books.svg(path, p::ExternalPlottingLibrary.Figure) = ExternalPlottingLibrary.save_svg(p)
Books.png(path, ...) = ...

And just make this the default way to handle extra dependencies. For someone who writes a book, adding a few methods like this shouldn't be too bad.