-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fixed background colour of PNGs saved with a non-zero opacity. #1868
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -411,7 +411,7 @@ RendererAgg::RendererAgg(unsigned int width, unsigned int height, double dpi, | |
renderingBuffer.attach(pixBuffer, width, height, stride); | ||
pixFmt.attach(renderingBuffer); | ||
rendererBase.attach(pixFmt); | ||
rendererBase.clear(agg::rgba(1, 1, 1, 0)); | ||
rendererBase.clear(agg::rgba(0, 0, 0, 0)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just curious -- why does this matter? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TBH I'm not sure. I'll experiment with reverting this (and my other colour change) now that I've merged @Westacular 's changes into this PR. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, it shouldn't make a difference anymore, now that the zero alpha value is being handled correctly. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. BTW: I don't care that it's been changed -- all zeros is in some way nicer -- I just wanted to make sure I was understanding what was going on. |
||
rendererAA.attach(rendererBase); | ||
rendererBin.attach(rendererBase); | ||
hatchRenderingBuffer.attach(hatchBuffer, HATCH_SIZE, HATCH_SIZE, | ||
|
@@ -1108,7 +1108,7 @@ RendererAgg::draw_image(const Py::Tuple& args) | |
inv_mtx.invert(); | ||
|
||
typedef agg::span_allocator<agg::rgba8> color_span_alloc_type; | ||
typedef agg::image_accessor_clip<agg::pixfmt_rgba32> | ||
typedef agg::image_accessor_clip<agg::pixfmt_rgba32_plain> | ||
image_accessor_type; | ||
typedef agg::span_interpolator_linear<> interpolator_type; | ||
typedef agg::span_image_filter_rgba_nn<image_accessor_type, | ||
|
@@ -2388,7 +2388,7 @@ RendererAgg::clear(const Py::Tuple& args) | |
_VERBOSE("RendererAgg::clear"); | ||
|
||
args.verify_length(0); | ||
rendererBase.clear(agg::rgba(1, 1, 1, 0)); | ||
rendererBase.clear(agg::rgba(0, 0, 0, 0)); | ||
|
||
return Py::Object(); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!