Comments (9)
Could you please test the latest version 0.2.2
and see if it has fixed the issue?
from rasterize.
If it's intentional, yes, I can work around it on my side.
(if you were wondering, I've used your crate for this).
from rasterize.
Sorry for the delayed response, but could you please provide an example of the scene
from rasterize.
I can't (easily), but the relevant code is https://github.com/lnicola/walker/blob/master/src/main.rs#L237-L256.
from rasterize.
If you have an email address, I can send you a trace of the Scene
s and Layer
s I get in the two versions (for the same input data).
from rasterize.
Actually, here's an example:
# rasterize 0.1
[src/main.rs:248] &scene = Stroke {
path: Line 2.912e6,5.524e6 2.912e6,5.523e6
Line 2.912e6,5.523e6 2.912e6,5.524e6
Line 2.912e6,5.524e6 2.912e6,5.524e6
Line 2.912e6,5.524e6 2.912e6,5.524e6
Line 2.912e6,5.524e6 2.912e6,5.524e6
Line 2.912e6,5.524e6 2.912e6,5.524e6
End
,
paint: LinColor(
[
1.0,
0.11697067,
0.0056053917,
1.0,
],
),
style: StrokeStyle {
width: 20.0,
line_join: Round,
line_cap: Butt,
},
}
[src/main.rs:255] &layer = Layer {
image: ImageOwned {
shape: Shape {
width: 882,
height: 632,
row_stride: 882,
col_stride: 1,
},
dtype: "rasterize::color::LinColor",
..
},
x: 363456,
y: -690725,
}
# rasterize 0.2
[src/main.rs:248] &scene = Stroke {
style: StrokeStyle {
width: 20.0,
line_join: Round,
line_cap: Butt,
},
paint: LinColor(
[
1.0,
0.11697067,
0.0056053917,
1.0,
],
),
path: Line 2.912e6,5.524e6 2.912e6,5.523e6
Line 2.912e6,5.523e6 2.912e6,5.524e6
Line 2.912e6,5.524e6 2.912e6,5.524e6
Line 2.912e6,5.524e6 2.912e6,5.524e6
Line 2.912e6,5.524e6 2.912e6,5.524e6
Line 2.912e6,5.524e6 2.912e6,5.524e6
End
,
}
[src/main.rs:255] &layer = Layer {
image: ImageOwned {
shape: Shape {
width: 7,
height: 11,
row_stride: 7,
col_stride: 1,
},
dtype: "rasterize::color::LinColor",
..
},
x: 363975,
y: -690447,
}
The paths are identical, but the output shape is not.
from rasterize.
Thanks for looking into it. It almost works, but it's still diverging from 0.1 at one point:
# 0.1
[src/main.rs:248] &scene = Stroke {
path: Line 2.911e6,5.524e6 2.911e6,5.524e6
Line 2.911e6,5.524e6 2.911e6,5.524e6
Line 2.911e6,5.524e6 2.911e6,5.524e6
End
,
paint: LinColor(
[
1.0,
0.11697067,
0.0056053917,
1.0,
],
),
style: StrokeStyle {
width: 20.0,
line_join: Round,
line_cap: Butt,
},
}
[src/main.rs:255] &layer = Layer {
image: ImageOwned {
shape: Shape {
width: 882,
height: 632,
row_stride: 882,
col_stride: 1,
},
dtype: "rasterize::color::LinColor",
..
},
x: 363456,
y: -690725,
}
# 0.2.2
[src/main.rs:248] &scene = Stroke {
style: StrokeStyle {
width: 20.0,
line_join: Round,
line_cap: Butt,
},
paint: LinColor(
[
1.0,
0.11697067,
0.0056053917,
1.0,
],
),
path: Line 2.911e6,5.524e6 2.911e6,5.524e6
Line 2.911e6,5.524e6 2.911e6,5.524e6
Line 2.911e6,5.524e6 2.911e6,5.524e6
End
,
}
[src/main.rs:255] &layer = Layer {
x: 0,
y: 0,
w: 0,
h: 0,
}
from rasterize.
This one's on me, I suppose. The path has three lines of length 0 (all six points have the same coordinates).
from rasterize.
I think new implementation tries to throw away layers that do not produce any output when bounding box is empty, this might explain this. Should we close this issue or are there any other problems?
from rasterize.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rasterize.