Comment 238 for bug 182038

Revision history for this message
In , Luke-hutchison (luke-hutchison) wrote :

Created an attachment (id=321843)
an image that manifests the "black box" problem

I think there are actually two problems here. This is an image that manifests the "black box" problem. Create the following HTML file in the same directory, and watch the image as it resizes. There seems to be a problem with calculating image offsets inside the clipping region, because for medium image sizes, the image displays but is vertically offset, and surrounded by black above or below; as the image's size continues to get bigger, the image that should be displayed moves upwards at about twice the speed of the increase in display size. For large or small sizes, the image shows as completely black, because the image content is being displayed above or below the clip region.

<html>
<head>
<script type="text/javascript">
function f() {
  var img = document.getElementById('pic');
  img.width += 100;
  if (img.width > 1700)
    img.width = 100;
  setTimeout('f()', 1000);
}
</script>
</head>
<body onload="javascript:f()">
<img src="kde4.0.png" id="pic"/>
</body>

The second problem is to do with transparency (not resizing), and displays a white image rather than a black image. I will attach an example below.