Skip to content

Commit

Permalink
auto merge of servo#1413 : dhedlund/servo/png_color_type, r=pcwalton
Browse files Browse the repository at this point in the history
This should fix images produced by the -o flag.

The gl2::read_pixels call was asking for pixel data in RGB8 but was then telling the PNG encoder that the data was RGBA8.  The value was originally set correctly, but was changed when support was added for drawing transparent PNGs.

We could instead adjust the gl2::read_pixels call to return RGBA8 so we can write transparent screenshots, but I'm not sure if there's a use case for that.
  • Loading branch information
bors-servo committed Dec 15, 2013
2 parents 6eb3f92 + 608cd61 commit 4440476
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/main/compositing/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ pub fn run_compositor(compositor: &CompositorTask) {
let img = png::Image {
width: width as u32,
height: height as u32,
color_type: png::RGBA8,
color_type: png::RGB8,
pixels: pixels,
};
let res = png::store_png(&img, &path);
Expand Down

0 comments on commit 4440476

Please sign in to comment.