Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add image.Trace method that produces an SVG #6253

Open
bep opened this issue Aug 21, 2019 · 7 comments
Open

Add image.Trace method that produces an SVG #6253

bep opened this issue Aug 21, 2019 · 7 comments
Assignees
Milestone

Comments

@bep
Copy link
Member

bep commented Aug 21, 2019

In the series "bep gets totally distracted", I'm about to add a image.Trace method.

There are several examples of this work in progress here:

https://temp.bep.is/hugotest/section1/trace/

A quick note: Some of the more detailed traces have bigger file sizes than their source, but they compress great (the gzipped version is < 40%) and of course scales better when you go bigger ...

There will be default options and options in config.toml. With the full set of options the usage will be something like this:

{{ $opts := dict "filter" "previtt" "color" "orange" "low" 30 "high" 100 "turdSize" 50 }}
{{ $traced := $img.Trace $opts }} // => SVG resource

I think the default filter will be luma (brightness), which is also the fastest.

/cc @regisphilibert and gang

@bep bep added this to the v0.58 milestone Aug 21, 2019
@bep bep self-assigned this Aug 21, 2019
@regisphilibert
Copy link
Member

Looks great! Don't have a concrete use case on my mind but designers must already do!

In the series "bep gets totally distracted".

Distraction is good, building pages from data source is great. 😛

@divinerites
Copy link

divinerites commented Aug 21, 2019

Régis my use case will be some lazy loading for my s**tload photos with small small svg but better looking than the flat grey I use for now.

Great feature bep. Thanks

@bep
Copy link
Member Author

bep commented Aug 21, 2019

There are several use cases. Maybe someone wants to create a "monochrome blog", where they can possibly also get away with "wget randomcopyrightedimage.jpg" ...

@bep bep modified the milestones: v0.58, v0.59 Aug 22, 2019
@bep bep modified the milestones: v0.59, v0.60 Sep 6, 2019
@bep bep modified the milestones: v0.60, v0.61 Oct 21, 2019
@bep bep modified the milestones: v0.61, v0.62, v0.63 Nov 25, 2019
@bep bep modified the milestones: v0.63, v0.64 Dec 11, 2019
@bep bep modified the milestones: v0.64, v0.65 Jan 22, 2020
@bep bep modified the milestones: v0.65, v0.66 Jan 30, 2020
@bep bep modified the milestones: v0.66, v0.67 Mar 2, 2020
@bep bep modified the milestones: v0.67, v0.68 Mar 9, 2020
@bep bep modified the milestones: v0.68, v0.69 Mar 20, 2020
@bep bep modified the milestones: v0.69, v0.70 Apr 8, 2020
@bep bep modified the milestones: v0.114.0, v0.115.0 Jun 13, 2023
@bep bep modified the milestones: v0.115.0, v0.116.0 Jun 30, 2023
@bep bep modified the milestones: v0.116.0, v0.117.0 Aug 1, 2023
@bep bep modified the milestones: v0.117.0, v0.118.0 Aug 30, 2023
@bep bep modified the milestones: v0.118.0, v0.119.0 Sep 15, 2023
@bep bep modified the milestones: v0.119.0, v0.120.0 Oct 4, 2023
@bep bep modified the milestones: v0.120.0, v0.121.0 Oct 31, 2023
@bep bep modified the milestones: v0.121.0, v0.122.0 Dec 6, 2023
@bep bep modified the milestones: v0.122.0, v0.123.0, v0.124.0 Jan 27, 2024
@bep bep modified the milestones: v0.124.0, v0.125.0 Mar 4, 2024
@bep bep modified the milestones: v0.125.0, v0.126.0 Apr 23, 2024
@bep bep modified the milestones: v0.126.0, v0.127.0 May 15, 2024
@bep bep modified the milestones: v0.127.0, v0.128.0 Jun 8, 2024
@bep bep modified the milestones: v0.128.0, v0.129.0 Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants