rem: if (actualWidth > gPreviewImageWidth || actualHeight > gPreviewImageHeight) {  dialog.PreviewImage.setAttribute("width", width); dialog.PreviewImage.setAttribute("height", height); } 
add: dialog.PreviewImage.width = width; dialog.PreviewImage.height = height; 
context: function PreviewImageLoaded(){  if (dialog.PreviewImage)  {    // Image loading has completed -- we can get actual width    actualWidth  = dialog.PreviewImage.naturalWidth;    actualHeight = dialog.PreviewImage.naturalHeight;    if (actualWidth && actualHeight)    {      // Use actual size or scale to fit preview if either dimension is too large      var width = actualWidth;      var height = actualHeight;      if (actualWidth > gPreviewImageWidth)      {          width = gPreviewImageWidth;          height = actualHeight * (gPreviewImageWidth / actualWidth);      }      if (height > gPreviewImageHeight)      {        height = gPreviewImageHeight;        width = actualWidth * (gPreviewImageHeight / actualHeight);      }      if (actualWidth > gPreviewImageWidth || actualHeight > gPreviewImageHeight)      {        // Resize image to fit preview frame        dialog.PreviewImage.setAttribute("width", width);        dialog.PreviewImage.setAttribute("height", height);      }      dialog.PreviewWidth.setAttribute("value", actualWidth);      dialog.PreviewHeight.setAttribute("value", actualHeight);      dialog.PreviewSize.setAttribute("collapsed", "false");      dialog.ImageHolder.setAttribute("collapsed", "false");      // Use values as start for constrain proportions    }    if (dialog.actualSizeRadio.checked)      SetActualSize();  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/492a58807eb0b22f626c1b330360545f64d5e70f/EdImageProps.js/buggy/editor/ui/dialogs/content/EdImageProps.js