Antônio Gomes wrote:
                        imgContainer->GetHeight(&height);
                        imgContainer->GetWidth(&width);

Might I ask why you're not just using naturalWidth and naturalHeight (on nsIDOMNSHTMLImageElement)?

// THIS COULD BE THE PROBLEM ... The image size is changed but not its DOM value :s
       img->SetHeight(height);
       img->SetWidth(width);

What do you mean by "its DOM value :s"?

Ok, I do get them resized at the first time, but if I try resizing again the same web page, when I try to get the new sizes of each images

From the imgContainer? The imgContainer gives you the size of the image encoded in the original GIF/JPEG/whatever file. It does not depend on the width or height of the displayed image. So what you're seeing is exactly what you should be seeing.

I'm not sure what you're trying to do, so I'm not sure what to tell you past this point.

-Boris
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout

Reply via email to