Page MenuHomePhabricator

Add a white background so transparent images can be read
Closed, ResolvedPublic

Description

Migrated from: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/223

Narrative

As a user, I can see transparent images against a white background, so that they are readable

Acceptance Criteria

  • Display a white background behind images, to make transparent images like this one more readable.
  • This white background would not exceed the size of the image, so it is invisible in most cases.
  • It would be added after the image has been loaded (to avoid an annoying white flash).
  • It would be removed before the image is removed (to avoid an annoying white flash).
  • The rest of the background screen would remain black, as we currently do.
  • This could apparently be done with a single line of CSS, according to Mark and Gergo.
  • This is an edge case, so if this seriously compromises performance, we may need to revisit it.

This ticket is in response to community reports like this one .

Related Bugs

https://bugzilla.wikimedia.org/show_bug.cgi?id=57620

Related Stories

#8 Media Viewer Front- End

Related Changesets

https://gerrit.wikimedia.org/r/#/c/117090/

Event Timeline

MingleTerminator raised the priority of this task from to Medium.
MingleTerminator added a project: Multimedia.
In mingle on 2014-02-20 at 15:38:13, @Gilles wrote:

I don't think using white instead of black helps. White images with a transparent background will be the ones thta are invisible, instead of black ones currently. I think that the only foolproof solution is to do what all image manipulation software does: a checkers background the same size as the image.

In mingle on 2014-02-20 at 23:20:30, @Tgr wrote:

I mentioned the same concern in one of the design meetings; the answer was that there are a lot more black + transparent images than white + transparent images, so this will work as a quick fix, and the more general solution could involve detecting the color of the image and choosing a background color based on that.

(Commons file description pages do the checkers thing, btw; it makes the transparency obvious, but it is not the most beautiful thing ever.)