> I retrieve the image from the
> imgIRequest using imgIContainer::EnsureCleanFrame.

I don't think that function does what you think it does.

A quick MXR search[1] shows that it's only called once in Mozilla code -- from inside the JPEG decoder -- so unless you're implementing something like a JPEG decoder, you probably don't want that function. :)

Do you have an imgIDecoderObserver implementation in your application? I think you'll need one of those, in order to get notifications about when the image has finished loading & decoding. See in particular OnStartContainer and OnStopDecode. For a sample implementation of those methods, see nsImageListener (which just forwards the methods along to identically-named methods in nsImageFrame). [2]

Joe or bholley could probably offer the best help here, but first I think they'd need more information about what you're trying to achieve. I'm CC'ing them, but it'd help if you could post back in a bit more detail about what you're trying to do and what you've got so far.

Good luck,
~Daniel

[1] http://mxr.mozilla.org/mozilla-central/search?string=EnsureCleanFrame

[2] http://mxr.mozilla.org/mozilla-central/source/layout/generic/nsImageFrame.h#75
http://mxr.mozilla.org/mozilla-central/source/layout/generic/nsImageFrame.cpp#2047


On 03/08/2011 06:51 PM, yakobom wrote:
Hi,
I hope this is the right place to get some answers on this issue.
In my embedding application (Windows, C++) I'm using
imgILoader::LoadImage to fetch images. I retrieve the image from the
imgIRequest using imgIContainer::EnsureCleanFrame. The problem is
that
I can only get JPG images, PNG ones come out black.
Any ideas?

I would appreciate any help, this is quite urgent.
Thanks,
yakobom
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout

Reply via email to